Commit b4475550 authored by o's avatar o
Browse files

we now handle urlencoded bas64 in the backend

parent 5b5a7ae0
Pipeline #7987 passed with stages
in 3 minutes and 23 seconds
...@@ -245,10 +245,10 @@ EOF ...@@ -245,10 +245,10 @@ EOF
@input_webauthn = { @input_webauthn = {
challenge: params[:challenge], challenge: params[:challenge],
credential_id: jsb64_tob64(response.fetch("id")), credential_id: response.fetch("id"),
client_data_json: jsb64_tob64(response.fetch("clientDataJSON")), client_data_json: (response.fetch("clientDataJSON")),
authenticator_data: jsb64_tob64(response.fetch("authenticatorData")), authenticator_data: (response.fetch("authenticatorData")),
signature: jsb64_tob64(response.fetch("signature")), signature: response.fetch("signature"),
} }
end end
end end
...@@ -298,7 +298,4 @@ EOF ...@@ -298,7 +298,4 @@ EOF
session[:pow_nonce_disclose] = session[:pow_nonce] = random_nonce session[:pow_nonce_disclose] = session[:pow_nonce] = random_nonce
end end
end end
def jsb64_tob64(str)
Base64.strict_encode64(Base64.urlsafe_decode64(str))
end
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment