ui: Fixed double slash in secret breaking db insert (#4392)

This commit is contained in:
Spaceman1984 2020-11-20 17:34:58 +02:00 committed by GitHub
parent 51034be270
commit 2ad60d0c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1824,8 +1824,7 @@ var processPropertiesInImagestoreObject = function(jsonObj) {
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, '-').replace(/\//g, '_').replace(/\=+$/, '');
if (id != null && secret != null) {
monitor = id + ":" + secret + "@" + monitor;