I have an URL:
And two matching entries:
-
Entry #1:
- KeePass URL Field = blank
- Kee > URLs > Domain
- Kee > URLs > Additional URLs: https://..r.stu.vwxyz/?.
- “Preferred matching entry” = false in Kee browser extension
-
Entry #2:
Expected result: Entry #2 is sorted as best entry
Actual result: Entry #1 is sorted as best entry
Question: how can I make sure that Entry #2 is sorted as best entry?
KeePass 2.57 (64-bit)
Kee Browser Extension (Edge) 4.0.6
KeePassRPC 1.14.0.0
Edge Version 127.0.2651.98 (Official build) (64-bit)
Windows Server 2019 (Version 1809) [OS Build 17763.6189]
I’m not seeing an option to edit my post, but it seems parts of the ‘Additional URLs’ in Entry #1 were interpreted as formatting by Discourse. This was supposed to be a Regular Expression, so I’ll try again in a code block:
https:\/\/.*\.r\.stu\.vwxyz\/?.*
@luckyrat do you have any suggestions by chance?
The “Domain” match preference in entry#1 won’t have any effect since you have a Regex in the additional URLs for that entry - Regex’s are always treated as an “Exact” match.
Not sure off the top of my head whether that alone will explain your issue but also make sure you’ve read Preferred entries and understood how they are supposed to work.
I doubt it will make much of a difference but have you tried the latest KeePassRPC version? Just in case the entry configuration changes there have fixed a bug we’re not aware of.
Thank you for your response. At this point in time, I’m on:
KeePass 2.57.1 (64-bit)
Kee Browser Extension (Edge) 4.0.6
KeePassRPC 2.0.2
Edge Version 133.0.3065.92 (Official build) (64-bit)
Windows Server 2019 (Version 1809) [OS Build 17763.6893]
I’ve read the preferred entries documentation. Specifically the mention of ‘enabling the preferred entry does not change the order of matched entries’ makes me think this feature will not yield the result I’m looking for regardless of the usage of RegEx’s.
As for the order of matched entries: I think two matches are mathematically calculated for match relevance and the highest score wins? I’ve read something about this potentially be called cardinality, but I may be misinterpreting the latter.
Based on this theory, I’ve sort-of managed to implement a “workaround”:
URL = https://abc-defgh1ij-klmno-pq01.r.stu.vwxyz/login
- Entry #1:
- KeePass URL Field = blank
- Kee > URLs > Exact (cosmetic, as RegEx will use Exact anyway)
- Kee > URLs > Additional URLs:
https:\/\/.*\.r\.stu\.vwxyz\/?.*
- “Preferred matching entry” = false in Kee browser extension
- Entry #2:
- KeePass URL Field = blank
- Kee > URLs > Hostname
- Kee > URLs > Additional URLs:
https:\/\/[abcABC]{3}\-.*\.r\.stu\.vwxyz\/?.*
- “Preferred matching entry” = false in Kee browser extension (doesn’t affect ordering anyway)
As entry #2 is a more specific match ([abcABC]{3}\-
) versus the less specific match (.*
), I’m assuming the “relevance math” comes out higher and therefore makes it the first listed entry?
As a final remark, I think there may also be a small chance that my issue stems from .vwxyz (which is obfuscation that is actually .local) is not part of the Public Suffix List (PSL) and may therefore be treated differently?