-
Notifications
You must be signed in to change notification settings - Fork 57
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
Treat different ports similarly to subdomains #164
Comments
I looked into it, this is a bit tricky because the library we use is not able to parse port, it just strips it entirely. While I did create a feature request thom4parisot/tld.js#136, that repo looks abandoned, so I think we will have to implement our in-house solution for this. PR would be welcome, the relevant place to modify would be |
Hmm, I'm not sure port makes sense in tld.js. It seems to be concerned strictly with domains as opposed to other parts of the URI. Because the |
Well spotted about Would be nice to have parsing hidden behind a single call to |
Hi, I used to be a contributor to If you would like a library which does a bit more, maybe you can have a look at url-parser, which is a pure JavaScript implementation of const { URL } = require('@cliqz/url-parser')
const url = new URL('https://sub.foo.com:42/path');
console.log(url.port); // '42'
console.log(url.host); // 'sub.foo.com:42'
console.log(url.hostname); // 'sub.foo.com'
console.log(url.domainInfo.domain); // 'foo.com'
console.log(url.domainInfo.publicSuffix); // 'com' I hope this helps, |
thanks for sharing! yes I'd like us to switch to one of these libraries you mention. |
Or in-house it. The primary issue is really having a full list of TLDs. If we have a good source for that, the native API is actually sufficient, and it will remove a dependency. For reference, https://publicsuffix.org/ seems to host a current list. |
Implemented in #179, next release is coming out this weekend. Thanks everyone for the help! |
General information
pacman browserpass and browserpass-chrome (aur)
Currently, it appears that the ports are excluded when comparing domain names to include in the initial drop-down lists.
I have a domain with several ports for various services. My pass tree looks something to the effect of below:
When I navigate to
example.com:2031
it listsroot
anduser
. I think it would be better to keep the ports separate. Browsers treat different ports as different origins.Currently subdomains listings include parent domain logins. (Logging in to
www.example.com
lists the logins forexample.com
) I think something like that would be appropriate to have a similar behavior for ports, so logging intoexample.com:2031
would include the logins forexample.com
, but not visa-versa, andexample.com
(no explicit port 80 or 443) would not showThe text was updated successfully, but these errors were encountered: