smorks / keepassnatmsg

KeePass plugin to expose credentials securely to a browser using Native Messaging
GNU General Public License v3.0
271 stars 28 forks source link

Ask questions about URL matching rules #112

Closed diaodeng closed 3 weeks ago

diaodeng commented 1 year ago

image Record A sets the field starting with URL and the field starting with KPH: to www.test2.com Record A default URL is www.test1.com Record B's default URL is www.test2.com image

Access address: www.test2.com My understanding is that if I only activate 13 or only activate 14, it should be able to match records A and B, but in reality, no matter how I set it, it can only match record B. Is it my understanding problem?

Do not want to achieve the above matching logic by copying A.

diaodeng commented 1 year ago

Software version used image

damienfinck commented 1 year ago

I have the same problem on my side with my database. I think the problem is with the "Match URL schemes" option. Try unchecking this option and then redoing your test to see.

damienfinck commented 11 months ago

Hi, I've created a PR https://github.com/smorks/keepassnatmsg/pull/115 to correct this compatibility problem between the 2 options.

damienfinck commented 10 months ago

@diaodeng : Reading your explanation again, I realize that I've misunderstood. I have indeed corrected a bug in the plugin, but probably not the one you're describing.

I tried to reproduce what you said, and I think I did the same as you.

image

First entry:

Second Entry:

And I visit the website https://keepass.info/help/kb/testform.html

With this, if I check option 13, it only offers me B If I only check option 14, it only offers me B

I think this behavior is normal.

Option 13 makes one entry work with multiple URLs. Option 14 allows multiple fields to be completed on a form in a website (in addition to username and password fields).

So entry A is not output in any case, because :

Entry B is always output via its URL field.

Does this answer your questions?

diaodeng commented 10 months ago

@damienfinck We should understand it differently.

There should be the account test111 here. image image

This way doesn't match, right? It's an incomplete domain name. image

damienfinck commented 10 months ago

Hi,

Answer to question n°1: With the default KeePassNatMsg options, you'll only have the test123 entry. But if you check the "Search string fields for URL" option in the "Advanced" tab of the KeePassNatMsg options, you'll get 2 results (test123 and test111). The "KPH" field is not useful in this case and can be removed. It is not used to match URLs, only form fields.

Answer to question n°2: The algorithm currently in place search for entries for "accounts.google.com". If entries are found in the database, the algorithm continues with these entries. If no entries are found, we look for entries for "google.com" in the database. In your case, there are entries for "accounts.google.com", so entries with "google.com" will not be used.

diaodeng commented 10 months ago

Ok, got it. Thank you very much for your answer.