mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: Fixed double slash in secret breaking db insert (#4392)
This commit is contained in:
parent
51034be270
commit
2ad60d0c5f
@ -1824,8 +1824,7 @@ var processPropertiesInImagestoreObject = function(jsonObj) {
|
|||||||
Replace the + and / symbols by - and _ to have URL-safe base64 going to the API
|
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
|
It's hacky, but otherwise we'll confuse java.net.URI which splits the incoming URI
|
||||||
*/
|
*/
|
||||||
secret = secret.replace("+", "-");
|
secret = secret.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
|
||||||
secret = secret.replace("/", "_");
|
|
||||||
|
|
||||||
if (id != null && secret != null) {
|
if (id != null && secret != null) {
|
||||||
monitor = id + ":" + secret + "@" + monitor;
|
monitor = id + ":" + secret + "@" + monitor;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user