chriszarate / supergenpass

A free bookmarklet password generator.
https://chriszarate.github.io/supergenpass/
GNU General Public License v2.0
418 stars 160 forks source link

TLD toggle does not work #73

Closed xrat closed 9 years ago

xrat commented 9 years ago

I am using Firefox 41 and https://chriszarate.github.io/supergenpass/mobile/ . No matter whether I have the TLD icon (Toggle subdomain removal) clicked/checked or not, SGP always removes anything in front of the TLD.

chriszarate commented 9 years ago

Are you still experiencing this issue? Do you see any errors in the console?

xrat commented 9 years ago

Hm, usually, I try to be careful with bug reports. Yet, here, I cannot reproduce what I reported. I am now using Firefox 42, no errors in the console. Subdomains are not removed, e.g. test.example.com is kept as such. However, I cannot use SGP for eMail addresses such as test@example.com. Even with the TLD icon crossed out, this is reduced to example.com, user@test.example.com is reduced to test.example.com. So, either Firefox changed or I actually wanted to use SGP for eMail addresses. Sorry for this mess.

chriszarate commented 9 years ago

No problem! SGP uses a standard regex that does remove usernames. The reason is that @ is a valid URI character used to provide credentials (e.g., "user:pass@example.com"). Strictly speaking, in order to isolate the hostname, everything before the @ should be removed. I think for most people this works out well, sorry it ran up against your expectations.