mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Replace multiple + and / symbols by - and _ to have URL-safe base64 going to the API (#5593)
Co-authored-by: YeoCheon Yun <ycyun@ycyun.xyz>
This commit is contained in:
parent
6f8822099d
commit
5ec7a29a2c
@ -504,8 +504,8 @@ export default {
|
||||
/* Replace the + and / symbols by - and _ to have URL-safe base64 going to the API
|
||||
It's hacky, but otherwise we'll confuse java.net.URI which splits the incoming URI
|
||||
*/
|
||||
secret = secret.replace('+', '-')
|
||||
secret = secret.replace('/', '_')
|
||||
secret = secret.replace(/\+/g, '-')
|
||||
secret = secret.replace(/\//g, '_')
|
||||
if (id !== null && secret !== null) {
|
||||
monitor = id + ':' + secret + '@' + monitor
|
||||
}
|
||||
|
||||
@ -2099,8 +2099,8 @@ export default {
|
||||
},
|
||||
rbdURL (monitor, pool, id, secret) {
|
||||
let url
|
||||
secret = secret.replace('+', '-')
|
||||
secret = secret.replace('/', '_')
|
||||
secret = secret.replace(/\+/g, '-')
|
||||
secret = secret.replace(/\//g, '_')
|
||||
if (id != null && secret != null) {
|
||||
monitor = id + ':' + secret + '@' + monitor
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user