mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
Allow URL-safe base64 cephx keys to be decoded.
In these cases + and / are replaced by - and _ to prevent problems when using the base64 strings in URLs. Signed-off-by: Wido den Hollander <wido@widodh.nl> Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
f67fe4e368
commit
ea11c7f9d8
@ -24,9 +24,9 @@ static int decode_bits(char c)
|
||||
return c - 'a' + 26;
|
||||
if (c >= '0' && c <= '9')
|
||||
return c - '0' + 52;
|
||||
if (c == '+')
|
||||
if (c == '+' || c == '-')
|
||||
return 62;
|
||||
if (c == '/')
|
||||
if (c == '/' || c == '_')
|
||||
return 63;
|
||||
if (c == '=')
|
||||
return 0; /* just non-negative, please */
|
||||
|
Loading…
Reference in New Issue
Block a user