Skip to content
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

URL whitelist is case sensitive #123

Open
Slowftw opened this issue Jun 18, 2023 · 0 comments
Open

URL whitelist is case sensitive #123

Slowftw opened this issue Jun 18, 2023 · 0 comments

Comments

@Slowftw
Copy link

Slowftw commented Jun 18, 2023

Non-lowercase URLs are being treated as unsafe. By the way, it would be more correct to use / instead of unsafe: ?

let whiteList = /^((https?|s?ftp|file|blob|mailto|tel):|#|\/|data:image\/)/;
if (whiteList.test(val)) {
return val;
}
return 'unsafe:' + val;

firefox_86tXZuZiky
4H3Ycu3ZDO
16vyDtExnX

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

No branches or pull requests

1 participant