Handle invalid UTF8 in path

... by not using ActiveSupport's broken `String#blank?` anymore
This commit is contained in:
Greg Karékinian 2015-07-01 17:08:52 +02:00
parent 267c8288ba
commit 898f59ba83

View File

@ -66,7 +66,8 @@ class LiquorCabinet < Sinatra::Base
token = env["HTTP_AUTHORIZATION"] ? env["HTTP_AUTHORIZATION"].split(" ")[1] : "" token = env["HTTP_AUTHORIZATION"] ? env["HTTP_AUTHORIZATION"].split(" ")[1] : ""
storage.authorize_request(@user, @directory, token, @key.blank?) unless request.options? no_key = @key.nil? || @key.empty?
storage.authorize_request(@user, @directory, token, no_key) unless request.options?
end end
options path do options path do