Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions to EntrySearcher accepting crazy terms for internal code use #3760

Merged

Conversation

Aetf
Copy link
Contributor

@Aetf Aetf commented Nov 1, 2019

Type of change

  • ✅ Bug fix (non-breaking change which fixes an issue)
  • ✅ Refactor (significant modification to existing code)

Description and Context

To properly fix #3729, we need a way to pass arbitrary terms to the entry searcher, bypassing the limitation of the search term minilanguage. I also removed QSharedPointer usage in search terms. These are not shared in multiple places and there's no benefit using QSharedPointer over using struct value directly.

  • EntrySearcher::SearchTerm and EntrySearcher::Field are now public
  • Add new overloads for EntrySearcher::search and EntrySearcher::searchEntries accepting search terms directly
  • Remove QSharedPointer usage

Testing strategy

  • Add new test case in testfdosecrets.cpp
  • Run both testfdosecrets and testentrysearcher

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]
  • ✅ I have added tests to cover my changes.

@Aetf Aetf force-pushed the entrysearcher-refactor branch from 7c48259 to 17939a6 Compare November 1, 2019 21:34
@droidmonkey
Copy link
Member

Please rebase onto 2.5.1

@droidmonkey droidmonkey added this to the v2.5.1 milestone Nov 2, 2019
@Aetf Aetf force-pushed the entrysearcher-refactor branch from 17939a6 to 54ffa7f Compare November 2, 2019 16:55
@Aetf Aetf changed the base branch from develop to release/2.5.1 November 2, 2019 16:57
@Aetf Aetf force-pushed the entrysearcher-refactor branch from 54ffa7f to e39524c Compare November 3, 2019 19:14
@Aetf
Copy link
Contributor Author

Aetf commented Nov 3, 2019

Rebase again on 2.5.1

@droidmonkey droidmonkey force-pushed the entrysearcher-refactor branch from e39524c to 1d4d688 Compare November 8, 2019 03:42
@droidmonkey droidmonkey added feature: Secret Service pr: refactoring Pull request that refactors code labels Nov 8, 2019
@droidmonkey droidmonkey merged commit f9097c8 into keepassxreboot:release/2.5.1 Nov 8, 2019
phoerious added a commit that referenced this pull request Nov 11, 2019
Added

- Add programmatic use of the EntrySearcher [#3760]
- Explicitly clear database memory upon locking even if the object is not deleted immediately [#3824]
- macOS: Add ability to perform notarization of built package [#3827]

Changed

- Reduce file hash checking to every 30 seconds to correct performance issues [#3724]
- Correct formatting of notes in entry preview widget [#3727]
- Improve performance and UX of database statistics page [#3780]
- Improve interface for key file selection to discourage use of the database file [#3807]
- Hide Auto-Type sequences column when not needed [#3794]
- macOS: Revert back to using Carbon API for hotkey detection [#3794]
- CLI: Do not show protected fields by default [#3710]

Fixed

- Secret Service: Correct issues interfacing with various applications [#3761]
- Fix building without additional features [#3693]
- Fix handling TOTP secret keys that require padding [#3764]
- Fix database unlock dialog password field focus [#3764]
- Correctly label open databases as locked on launch [#3764]
- Prevent infinite recursion when two databases AutoOpen each other [#3764]
- Browser: Fix incorrect matching of invalid URLs [#3759]
- Properly stylize the application name on Linux [#3775]
- Show application icon on Plasma Wayland sessions [#3777]
- macOS: Check for Auto-Type permissions on use instead of at launch [#3794]
@Aetf Aetf deleted the entrysearcher-refactor branch November 27, 2019 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Secret Service pr: refactoring Pull request that refactors code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants