Skip to content

Conversation

@max-baz
Copy link
Member

@max-baz max-baz commented Apr 10, 2019

@erayd need your opinion, why do we detect deepest available domain component instead of the outermost available one? We don't expect users to store "google.com/gitproxy.zycloud.tk.gpg", right? What was the use-case for this?

The reason I'm bringing this up is because someone reported to me a bug in person, that Browserpass does not correctly show the matching sites in popup.

For example, ~/.password-store/github.com/maxim.baz.gpg will not show up on github.com, because according to our current parsing algorithm maxim.baz will be considered a domain name, not github.com.

@erayd
Copy link
Collaborator

erayd commented Apr 10, 2019

We don't expect users to store "google.com/gitproxy.zycloud.tk.gpg", right?

Unfortunately, yes - we do. The specific use-case was storing credentials as (e.g.) my-employer.com/gmail.com. For example, someone working at Twitter might have an entry named twitter.com/gmail.com.

One of the reasons we added tldjs was to prevent problems with this approach - ensuring that only valid domains are considered as part of this algorithm removes most of the incorrect matches. It's still possible that the odd one might sneak through, but they should be the minority.

For the record, I am strongly opposed to this change, and would prefer to keep the current logic.

@max-baz
Copy link
Member Author

max-baz commented Apr 10, 2019

Agree, we chatted offline and fixed the bug in a different way: #84

@max-baz max-baz closed this Apr 10, 2019
@max-baz max-baz deleted the parsing-domains branch April 10, 2019 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants