Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Security: Restrict login domains to TLD #230

Open
mountainash opened this issue May 6, 2021 · 2 comments
Open

Security: Restrict login domains to TLD #230

mountainash opened this issue May 6, 2021 · 2 comments

Comments

@mountainash
Copy link

A crafty scriptor could get around the isLoginURL function by creating a link (in a tracks comments/description) to a subdomain to match the login URLs such as https://accounts.google.com.bad-actor.com/shellscript.html.

Would be safer to check that the domain match is restricted to the top level eg /^https:\/\/accounts\.google\.com\/.*/i,

Workflow wise this could be done at the same time as #206. Also at the same time; new-window is being deprecated.

References:

@mountainash
Copy link
Author

Also the facebook regex doesn't escape the dot separators . -

@salomvary
Copy link
Owner

@mountainash Thanks for your insights, much appreciated! Processing URLs with regular expressions has never been a good idea...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants