instance method urlsafe_decode64

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v5.2.8.1 Private

Signature

urlsafe_decode64(str)

No documentation comment.

Parameters

str req
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 487
            def urlsafe_decode64(str)
              # NOTE: RFC 4648 does say nothing about unpadded input, but says that
              # "the excess pad characters MAY also be ignored", so it is inferred that
              # unpadded input is also acceptable.
              str = str.tr("-_", "+/")
              if !str.end_with?("=") && str.length % 4 != 0
                str = str.ljust((str.length + 3) & ~3, "=")
              end
              strict_decode64(str)
            end

Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 487 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::RequestForgeryProtection

Type at least 2 characters to search.

↑↓ navigate · open · esc close