This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 5ec7a29 Replace multiple + and / symbols by - and _ to have URL-safe
base64 going to the API (#5593)
5ec7a29 is described below
commit 5ec7a29a2cbfc27b1a0e3e2c7049303bbd4d1c8a
Author: DH Park <[email protected]>
AuthorDate: Sun Oct 24 06:29:28 2021 +0900
Replace multiple + and / symbols by - and _ to have URL-safe base64 going
to the API (#5593)
Co-authored-by: YeoCheon Yun <[email protected]>
---
ui/src/views/infra/AddPrimaryStorage.vue | 4 ++--
ui/src/views/infra/zone/ZoneWizardLaunchZone.vue | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/src/views/infra/AddPrimaryStorage.vue
b/ui/src/views/infra/AddPrimaryStorage.vue
index 0b43eb5..3698b35 100644
--- a/ui/src/views/infra/AddPrimaryStorage.vue
+++ b/ui/src/views/infra/AddPrimaryStorage.vue
@@ -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
}
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index 95c3be7..69e61bb 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -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
}