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

Best Matching URL option not returning correct URL #252

Open
Watchful1 opened this issue Jan 15, 2016 · 9 comments
Open

Best Matching URL option not returning correct URL #252

Watchful1 opened this issue Jan 15, 2016 · 9 comments

Comments

@Watchful1
Copy link

I have a number of "sites" hosted on the same domain. KeePassHTTP seems to properly recognize some of them, but not others. I do have the "Return only best matching entries for an URL instead of all entries for the whole domain" option checked.

For example,

http://localhost/txhouston returns the correct user/pass.
http://localhost/nvlyon returns the above txhouston user/pass.

If the url field is cleared for the txhouston entry, the nvlyon entry returns all localhost entries, including the nvlyon one.

Even though the URL matches exactly, it's not returning the correct entry.

This extends to non-localhost sites as well.

@pfn
Copy link
Owner

pfn commented Jan 15, 2016

The matching is only performed on the host, not path. This is carried over
from the original Firefox password manager implementation.

On Fri, Jan 15, 2016, 12:13 PM Watchful1 [email protected] wrote:

I have a number of "sites" hosted on the same domain KeePassHTTP seems to
properly recognize some of them, but not others I do have the "Return only
best matching entries for an URL instead of all entries for the whole
domain" option checked

For example,

http://localhost/txhouston returns the correct user/pass
http://localhost/nvlyon returns the above txhouston user/pass

If the url field is cleared for the txhouston entry, the nvlyon entry
returns all localhost entries, including the nvlyon one

Even though the URL matches exactly, it's not returning the correct entry

This extends to non-localhost sites as well


Reply to this email directly or view it on GitHub
#252.

@Watchful1
Copy link
Author

What does the "Return only best matching.." option do then? How does it determine which entry that matches a domain to return?

@pfn
Copy link
Owner

pfn commented Jan 16, 2016

Best matching by host

On Fri, Jan 15, 2016, 3:23 PM Watchful1 [email protected] wrote:

What does the "Return only best matching.." option do then? How does it
determine which entry that matches a domain to return?


Reply to this email directly or view it on GitHub
#252 (comment).

@Watchful1
Copy link
Author

But if there are multiple entries with the same host, how does it decide which one to return?

@pfn
Copy link
Owner

pfn commented Jan 16, 2016

It returns them all

On Fri, Jan 15, 2016, 5:23 PM Watchful1 [email protected] wrote:

But if there are multiple entries with the same host, how does it decide
which one to return?


Reply to this email directly or view it on GitHub
#252 (comment).

@Watchful1
Copy link
Author

It doesn't appear to with the option selected. In my case above, it was only returning one entry, but it was the wrong one in certain cases.

@pfn
Copy link
Owner

pfn commented Jan 16, 2016

I probably misremember, it likely returns the first closest match found

On Fri, Jan 15, 2016, 5:26 PM Watchful1 [email protected] wrote:

It doesn't appear to with the option selected. In my case above, it was
only returning one entry, but it was the wrong one in certain cases.


Reply to this email directly or view it on GitHub
#252 (comment).

@Watchful1
Copy link
Author

Would you be willing to make a change so that when the option is selected, and multiple entries are found, it looks to see if one matches the path? Or maybe accept a pull request to that effect?

@pfn
Copy link
Owner

pfn commented Jan 16, 2016

I would be willing to accept well written PRs

I've been super busy and haven't had time to review and merge though, I'll
try to look at anything that comes in.

On Fri, Jan 15, 2016, 5:30 PM Watchful1 [email protected] wrote:

Would you be willing to make a change so that when the option is selected,
and multiple entries are found, it looks to see if one matches the path? Or
maybe accept a pull request to that effect?


Reply to this email directly or view it on GitHub
#252 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants