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

Add noopener and noreferrer to external URLs #435

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

RobertBoes
Copy link
Contributor

@RobertBoes RobertBoes commented Oct 31, 2023

This adds rel="noopener noreferrer" to external URLs. Technically noopener is not needed for newer browsers, because they set it automatically when target="_blank", but to me it still seems like a nice thing to not send the referrer along.

If the opener is sent along it could potentially also be used in a destructive way. Ignition previously had a RCE vulnerability, if any of the external links contain malicious JS, combined with an RCE it could lead to some bad things. If I'm not mistaken Ignition still has the ability to adjust code (solutions), so IMHO applying these anchor attributes would be good security-wise. Better safe than sorry :)

https://mathiasbynens.github.io/rel-noopener/

Accompanying PR for ignition-ui: spatie/ignition-ui#17

@AlexVanderbist
Copy link
Member

Sounds good! We assumed target="_blank" would cover us on this, but you're right on old browsers.

@AlexVanderbist AlexVanderbist merged commit c3798fb into spatie:main Feb 1, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants