]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Replace encodeURI for encodeURIComponent
authorTiago Melo <tmelo@suse.com>
Wed, 13 Feb 2019 15:36:47 +0000 (15:36 +0000)
committerTiago Melo <tmelo@suse.com>
Tue, 19 Feb 2019 16:39:03 +0000 (16:39 +0000)
Fixes: http://tracker.ceph.com/issues/38303
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts

index 97051ca5cea52a1ce60a221f9c9c1e32feee5d7a..335798f9c3d820cf7243953a515e8561dcb25426 100644 (file)
@@ -82,7 +82,9 @@ export class RbdListComponent implements OnInit {
     this.permission = this.authStorageService.getPermissions().rbdImage;
     const getImageUri = () =>
       this.selection.first() &&
-      `${encodeURI(this.selection.first().pool_name)}/${encodeURI(this.selection.first().name)}`;
+      `${encodeURIComponent(this.selection.first().pool_name)}/${encodeURIComponent(
+        this.selection.first().name
+      )}`;
     const addAction: CdTableAction = {
       permission: 'create',
       icon: 'fa-plus',
index e186195c5c71f2e378d5e74eeac6cc84031b22b5..b1fd47fa13e424c4c511f0f2dcf7dd31b571da9a 100644 (file)
@@ -84,9 +84,9 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
     actions.unprotect.click = () => this.toggleProtection();
     const getImageUri = () =>
       this.selection.first() &&
-      `${encodeURI(this.poolName)}/${encodeURI(this.rbdName)}/${encodeURI(
-        this.selection.first().name
-      )}`;
+      `${encodeURIComponent(this.poolName)}/${encodeURIComponent(
+        this.rbdName
+      )}/${encodeURIComponent(this.selection.first().name)}`;
     actions.clone.routerLink = () => `/block/rbd/clone/${getImageUri()}`;
     actions.copy.routerLink = () => `/block/rbd/copy/${getImageUri()}`;
     actions.rollback.click = () => this.rollbackModal();
index f7b7787a29bc4630733a561728df5f06eb3af8df..f504d544853212ba549e96d9d8649f06bdc56eb4 100644 (file)
@@ -87,7 +87,7 @@ export class ConfigurationComponent implements OnInit {
   ) {
     this.permission = this.authStorageService.getPermissions().configOpt;
     const getConfigOptUri = () =>
-      this.selection.first() && `${encodeURI(this.selection.first().name)}`;
+      this.selection.first() && `${encodeURIComponent(this.selection.first().name)}`;
     const editAction: CdTableAction = {
       permission: 'update',
       icon: 'fa-pencil',