From b14249b81e4f3f42a8f819bea8b660a54d23b475 Mon Sep 17 00:00:00 2001 From: Matthew Irish Date: Wed, 27 Feb 2019 14:44:11 -0600 Subject: [PATCH] encode paths in the console service --- ui/app/services/console.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/services/console.js b/ui/app/services/console.js index f9f5afd2b4c2..babac4e7b9de 100644 --- a/ui/app/services/console.js +++ b/ui/app/services/console.js @@ -5,6 +5,7 @@ import Service from '@ember/service'; import { getOwner } from '@ember/application'; import { computed } from '@ember/object'; import { shiftCommandIndex } from 'vault/lib/console-helpers'; +import { encodePath } from 'vault/utils/path-encoding-helpers'; export function sanitizePath(path) { //remove whitespace + remove trailing and leading slashes @@ -74,7 +75,7 @@ export default Service.extend({ ajax(operation, path, options = {}) { let verb = VERBS[operation]; let adapter = this.adapter(); - let url = adapter.buildURL(path); + let url = adapter.buildURL(encodePath(path)); let { data, wrapTTL } = options; return adapter.ajax(url, verb, { data,