-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement best matches only option with browser integration #1822
Implement best matches only option with browser integration #1822
Conversation
Better add "fixes" or so, before each issue you link, so it is automatically closed when a PR is merged. (I know, third time I comment that. 😄) |
BTW as for me I could not even find that setting in the UI in KeePassXC. The description here sounds as if the option is there, but just did not work. Or did you hide it deliberately, because you needed to make it work? |
The setting has been hidden since the new browser integration was merged because it was not implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment but otherwise fine
src/browser/BrowserService.cpp
Outdated
const int priority = sortPriority(entry, host, submitUrl, baseSubmitUrl); | ||
|
||
// Ignore matches that aren't exact enough | ||
if (BrowserSettings::bestMatchOnly() && priority < 100) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 100 represent percent matching? If not, this might need some explaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly. It's from the old HTTP implementation that tries to mimic a percentage. See https://github.com/varjolintu/keepassxc/blob/e0a06bd515d77a9b62991a5ee2a8a4740cf79bb3/src/browser/BrowserService.cpp#L650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... This will be a target for 2.4 haha
85e8e19
to
1ae145e
Compare
5eb2388
to
c5845b1
Compare
Rebased. I think this is quite ready for merging. |
I fixed an error where zero priority matches were being filtered by the sort function. We should really collapse a lot of the filtering and sorting happening in the browser service in 2.4. |
- Enable high entropy ASLR on Windows [#1747] - Enhance favicon fetching [#1786] - Fix crash on Windows due to autotype [#1691] - Fix dark tray icon changing all icons [#1680] - Fix --pw-stdin not using getPassword function [#1686] - Fix placeholders being resolved in notes [#1907] - Enable auto-type start delay to be configurable [#1908] - Browser: Fix native messaging reply size [#1719] - Browser: Increase maximum buffer size [#1720] - Browser: Enhance usability and functionality [#1810, #1822, #1830, #1884, #1906] - SSH Agent: Parse aes-256-cbc/ctr keys [#1682] - SSH Agent: Enhance usability and functionality [#1677, #1679, #1681, #1787]
Returning only the best matched entries option hasn't worked properly. This fixes it and only returns entries with sort priority 100.
Description
It's not perfect but a small improvement. If you can think anything that could improve this PR please let me know.
Motivation and context
Fixes
keepassxreboot/keepassxc-browser#84
Fixes #1112
How has this been tested?
Manually.
Types of changes
Checklist:
-DWITH_ASAN=ON
. [REQUIRED]