Skip to content

Commit

Permalink
Remove base64 dependency
Browse files Browse the repository at this point in the history
base64 will be removed from the default gems in Ruby 3.4. Switch
to using String#unpack1 instead.
  • Loading branch information
jeremyevans committed Aug 15, 2023
1 parent 444dc8a commit 9b333f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rack/auth/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require_relative 'abstract/handler'
require_relative 'abstract/request'
require 'base64'

module Rack
module Auth
Expand Down Expand Up @@ -46,7 +45,7 @@ def basic?
end

def credentials
@credentials ||= Base64.decode64(params).split(':', 2)
@credentials ||= params.unpack1('m').split(':', 2)
end

def username
Expand Down

0 comments on commit 9b333f5

Please sign in to comment.