Skip to content

Commit 425f20e

Browse files
kitallischildish-sambino
authored and
childish-sambino
committed
Update encode64 to strict_encode64 in RequestValidator#build_signature_for (#450)
Base64#strict_encode64 takes care of removing line feeds so no character stripping is required at the end
1 parent 0c05c05 commit 425f20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/twilio-ruby/security/request_validator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def build_hash_for(body)
5858
def build_signature_for(url, params)
5959
data = url + params.sort.join
6060
digest = OpenSSL::Digest.new('sha1')
61-
Base64.encode64(OpenSSL::HMAC.digest(digest, @auth_token, data)).strip
61+
Base64.strict_encode64(OpenSSL::HMAC.digest(digest, @auth_token, data))
6262
end
6363

6464
private

0 commit comments

Comments
 (0)