keepasshttp icon indicating copy to clipboard operation
keepasshttp copied to clipboard

Best Matching URL option not returning correct URL

Open Watchful1 opened this issue 9 years ago • 9 comments

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.

Watchful1 avatar Jan 15 '16 20:01 Watchful1

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 https://github.com/pfn/keepasshttp/issues/252.

pfn avatar Jan 15 '16 23:01 pfn

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

Watchful1 avatar Jan 15 '16 23:01 Watchful1

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 https://github.com/pfn/keepasshttp/issues/252#issuecomment-172124718.

pfn avatar Jan 16 '16 00:01 pfn

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

Watchful1 avatar Jan 16 '16 01:01 Watchful1

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 https://github.com/pfn/keepasshttp/issues/252#issuecomment-172142730.

pfn avatar Jan 16 '16 01:01 pfn

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.

Watchful1 avatar Jan 16 '16 01:01 Watchful1

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 https://github.com/pfn/keepasshttp/issues/252#issuecomment-172143026.

pfn avatar Jan 16 '16 01:01 pfn

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?

Watchful1 avatar Jan 16 '16 01:01 Watchful1

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 https://github.com/pfn/keepasshttp/issues/252#issuecomment-172143714.

pfn avatar Jan 16 '16 01:01 pfn