-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 base64
dependency
#1937
Comments
Why not just add it as a dependency like any other gem we need? |
I didn't say we shouldn't, just pointed out it was a possibility – in the case of Rack (rack/rack#2110) it was very simple. I do not advocate for Sinatra to maintain this code: https://github.com/ruby/ruby/blob/efd611ceb661a230f121797079376cdb4e831951/lib/base64.rb#L80-L113 |
I suspect some may be using rack-protection in applications that try to be interoperable with Rails csrf protection (mounted apps). Staying in-line with Rails may not be something we want to aim for, but just wanted to throw that out there. That's the only reason I can think of for sticking with Base64. |
base64
needs to be a explicit dependency in Ruby 3.4.0Similar PRs are rails/rails#48907 and rack/rack#2109
It is possible to get away with
pack
/unpack
methods: rack/rack#2110 but Sinatra (authenticity_token middleware in rack-protection) do use the two urlsafe methods:sinatra/rack-protection/lib/rack/protection/authenticity_token.rb
Lines 227 to 233 in 35bc85b
The text was updated successfully, but these errors were encountered: