lib/graphql/schema/base_64_encoder.rb in graphql-1.8.6 vs lib/graphql/schema/base_64_encoder.rb in graphql-1.8.7

- old
+ new

@@ -1,15 +1,19 @@ # frozen_string_literal: true + +require 'graphql/schema/base_64_bp' + module GraphQL class Schema # @api private module Base64Encoder def self.encode(plaintext, nonce: false) Base64.strict_encode64(plaintext) end def self.decode(ciphertext, nonce: false) - Base64.decode64(ciphertext) + # urlsafe_decode64 is for forward compatibility + Base64Bp.urlsafe_decode64(ciphertext) end end end end