Skip to content

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