Try to repair wrongly encoded proxy secret.

This commit is contained in:
levlam 2024-01-29 15:48:57 +03:00
parent 983f669116
commit 437c2d0c6e

View File

@ -17,6 +17,9 @@ Result<ProxySecret> ProxySecret::from_link(Slice encoded_secret, bool truncate_i
if (r_decoded.is_error()) { if (r_decoded.is_error()) {
r_decoded = base64url_decode(encoded_secret); r_decoded = base64url_decode(encoded_secret);
} }
if (r_decoded.is_error()) {
r_decoded = base64_decode(encoded_secret);
}
if (r_decoded.is_error()) { if (r_decoded.is_error()) {
return Status::Error(400, "Wrong proxy secret"); return Status::Error(400, "Wrong proxy secret");
} }