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

[Feature Proposal]add NoLinkToBack linter #370

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

msasaki666
Copy link

@msasaki666 msasaki666 commented Aug 27, 2024

The :back option of the link_to method in Ruby on Rails is handy.
However, there is potential for Reflected XSS attacks through HTTP Referer pollution using dataURL.

↓ Rails doesn't validate dataURL.
https://github.com/rails/rails/blob/main/actionview/lib/action_view/helpers/url_helper.rb#L58

I considered contributing to Rails itself, but due to backwards compatibility issues, I didn't think I could change that right away.
So I thought about adding a custom linter to this wonderful gem.
I figured other developers might have similar problems, so I have now issued a PR.

If you don't need it, feel free to close it.

@msasaki666 msasaki666 changed the title add NoLinkToBack linter [Feature Proposal]add NoLinkToBack linter Aug 30, 2024
@msasaki666 msasaki666 marked this pull request as ready for review August 30, 2024 13:40
@msasaki666 msasaki666 marked this pull request as draft August 30, 2024 13:43
@msasaki666 msasaki666 marked this pull request as ready for review August 31, 2024 02:21
@msasaki666
Copy link
Author

I have signed the CLA!

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.

1 participant