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

naughtyHref always allows hrefs with empty schemes #132

Closed
dbkr opened this issue Sep 21, 2016 · 3 comments
Closed

naughtyHref always allows hrefs with empty schemes #132

dbkr opened this issue Sep 21, 2016 · 3 comments

Comments

@dbkr
Copy link
Contributor

dbkr commented Sep 21, 2016

This means that links of the form, "//example.com/nasty.js" will always be accepted, essentially allowing links to whatever scheme to host page is served over. In practice, this means it's possible to link to http(s) content even if neither 'http' not 'https' are in allowedSchemes / allowedSchemesByTag.

@boutell
Copy link
Member

boutell commented Sep 21, 2016

Hmm.

"Protocol-relative" is not a scheme. But it is a thing that someone might reasonably want to disable, yes.

I guess it would make sense to provide an option to cover this:

allowProtocolRelative

Which would be true by default, for backwards compatibility.

A PR would certainly be welcome.

@simison
Copy link
Contributor

simison commented Aug 20, 2017

@boutell This can probably be closed since allowProtocolRelative is now in:

4c229fb

@stale
Copy link

stale bot commented Jul 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 7, 2020
@abea abea closed this as completed Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants