[fix] it's actually 32

This commit is contained in:
Laurent Peuch 2017-09-18 22:43:37 +02:00
parent 8626a2dca0
commit fbbf73fae1

View file

@ -115,7 +115,7 @@ end
if params.has_key?("public_key")
public_key = Base64.decode64(params[:public_key].encode('ascii-8bit'))
# might be 88
unless public_key.length == 24 or public_key.length == 45
unless public_key.length == 24 or public_key.length == 32
halt 400, { :error => "Key is invalid: #{public_key.to_s.encode('UTF-8', {:invalid => :replace, :undef => :replace, :replace => '?'})}" }.to_json
end
end