Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add .local pseduo TLD support to URL Match accuracy domain overrides #35
I'm trying to add some domain overrides in for URL match accuracy in the database settings. Our internal domain's TLD is '.local' (yes.. I know...) Unfortunately, Kee doesn't let met add a .local domain as an override, but tells me "Invalid domain name".
It seems that the domain name check in Forms/KeeMAMOverride.cs is too restrictive.
Technically .local is not a TLD, rather a pseudo TLD. Not that this helps you of course. The domain override feature requires domain names to function so the restriction in the KeeMAMOverride form is necessary in order to avoid bugs cropping up in other parts of the plugin.
To support .local would mean rewriting parts of the override feature to no longer expect a domain name. I'm not sure how feasible that is and won't have time to investigate myself in the foreseeable future but if someone else wants to look into it, bear in mind that enabling IP address support for this feature is another idea worth considering when developing an improvement. I expect there to be a fair bit of overlap in the two features although IP addresses would need to go a little further with more complex planning for the use of CIDR notation and/or wildcards.
It would also most likley make sense to add support for https://en.wikipedia.org/wiki/Top-level_domain#Reserved_domains at the same time.
As long as changes to this feature don't impact on the security, performance or usability of the current public domain name support, I'd accept a PR.
It's not really a thing to be fixed though. The library is correctly reporting the status of the string being supplied to it (i.e. it is not a registrable domain).
To add support for unregistrable domains would be something that would stretch the boundaries of what that library should be responsible for so I think it would be better to put the enhancement into KeePassRPC, rather than the PSL library. Whether we still use the PSL library for this after making the change is debatable - it depends upon how complex and bespoke we have to make the checks for different variants of hostnames/IPs/registrable domains/ports.