From dcc8e54234fb7acbbede52bfc9f74ce1e1deb491 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 8 Jul 2024 13:39:54 +0900 Subject: [PATCH] [ruby/open-uri] Don't use Base64 library https://github.com/ruby/open-uri/commit/c8c0452d53 --- test/open-uri/utils.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/open-uri/utils.rb b/test/open-uri/utils.rb index b529ba8fe8..3a79a32ea1 100644 --- a/test/open-uri/utils.rb +++ b/test/open-uri/utils.rb @@ -1,5 +1,4 @@ require 'socket' -require 'base64' class SimpleHTTPServer def initialize(bind_addr, port, log) @@ -79,7 +78,7 @@ class SimpleHTTPServer return unless auth && auth.start_with?('Basic ') encoded_credentials = auth.split(' ', 2).last - decoded_credentials = Base64.decode64(encoded_credentials) + decoded_credentials = [encoded_credentials].pack("m") @username, @password = decoded_credentials.split(':', 2) end end