public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-widget-toolkit] correctly encode upid paramenter (use encodeURIComponent)
Date: Thu, 22 Oct 2020 08:38:17 +0200	[thread overview]
Message-ID: <20201022063817.10809-1-dietmar@proxmox.com> (raw)

---
 src/window/TaskViewer.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/window/TaskViewer.js b/src/window/TaskViewer.js
index 0333472..31e1ebc 100644
--- a/src/window/TaskViewer.js
+++ b/src/window/TaskViewer.js
@@ -14,7 +14,7 @@ Ext.define('Proxmox.window.TaskProgress', {
 	let task = Proxmox.Utils.parse_task_upid(me.upid);
 
 	let statstore = Ext.create('Proxmox.data.ObjectStore', {
-            url: "/api2/json/nodes/" + task.node + "/tasks/" + me.upid + "/status",
+            url: "/api2/json/nodes/" + task.node + "/tasks/" + encodeURIComponent(me.upid) + "/status",
 	    interval: 1000,
 	    rows: {
 		status: { defaultValue: 'unknown' },
@@ -190,7 +190,7 @@ Ext.define('Proxmox.window.TaskViewer', {
 	};
 
 	let statstore = Ext.create('Proxmox.data.ObjectStore', {
-            url: "/api2/json/nodes/" + task.node + "/tasks/" + me.upid + "/status",
+            url: "/api2/json/nodes/" + task.node + "/tasks/" + encodeURIComponent(me.upid) + "/status",
 	    interval: 1000,
 	    rows: rows,
 	});
@@ -199,7 +199,7 @@ Ext.define('Proxmox.window.TaskViewer', {
 
 	let stop_task = function() {
 	    Proxmox.Utils.API2Request({
-		url: "/nodes/" + task.node + "/tasks/" + me.upid,
+		url: "/nodes/" + task.node + "/tasks/" + encodeURIComponent(me.upid),
 		waitMsgTarget: me,
 		method: 'DELETE',
 		failure: function(response, opts) {
@@ -233,7 +233,7 @@ Ext.define('Proxmox.window.TaskViewer', {
 	    title: gettext('Output'),
 	    tbar: [stop_btn2],
 	    border: false,
-	    url: "/api2/extjs/nodes/" + task.node + "/tasks/" + me.upid + "/log",
+	    url: "/api2/extjs/nodes/" + task.node + "/tasks/" + encodeURIComponent(me.upid) + "/log",
 	});
 
 	me.mon(statstore, 'load', function() {
-- 
2.20.1




             reply	other threads:[~2020-10-22  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  6:38 Dietmar Maurer [this message]
2020-10-22  6:48 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022063817.10809-1-dietmar@proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal