* [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view
@ 2021-01-19 13:33 Oguz Bektas
2021-01-25 15:13 ` Dominik Csapak
2021-01-26 9:54 ` [pbs-devel] applied: " Wolfgang Bumiller
0 siblings, 2 replies; 3+ messages in thread
From: Oguz Bektas @ 2021-01-19 13:33 UTC (permalink / raw)
To: pbs-devel
userid parameter needs to be properly encoded when shown on the browser
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
www/config/UserView.js | 2 ++
www/window/UserEdit.js | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/config/UserView.js b/www/config/UserView.js
index 4645737a..ae313776 100644
--- a/www/config/UserView.js
+++ b/www/config/UserView.js
@@ -139,6 +139,8 @@ Ext.define('PBS.config.UserView', {
xtype: 'proxmoxStdRemoveButton',
baseurl: '/access/users/',
enableFn: (rec) => rec.data.userid !== 'root@pam',
+ getUrl: (rec) =>
+ `/access/users/${encodeURIComponent(rec.getId())}`,
callback: 'reload',
},
'-',
diff --git a/www/window/UserEdit.js b/www/window/UserEdit.js
index aaae835f..06ec5377 100644
--- a/www/window/UserEdit.js
+++ b/www/window/UserEdit.js
@@ -20,7 +20,7 @@ Ext.define('PBS.window.UserEdit', {
var baseurl = '/api2/extjs/access/users';
me.isCreate = !userid;
- me.url = userid ? baseurl + '/' + userid : baseurl;
+ me.url = userid ? baseurl + '/' + encodeURIComponent(userid) : baseurl;
me.method = userid ? 'PUT' : 'POST';
me.autoLoad = !!userid;
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view
2021-01-19 13:33 [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view Oguz Bektas
@ 2021-01-25 15:13 ` Dominik Csapak
2021-01-26 9:54 ` [pbs-devel] applied: " Wolfgang Bumiller
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-01-25 15:13 UTC (permalink / raw)
To: pbs-devel
LGTM
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
On 1/19/21 2:33 PM, Oguz Bektas wrote:
> userid parameter needs to be properly encoded when shown on the browser
>
> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
> www/config/UserView.js | 2 ++
> www/window/UserEdit.js | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/www/config/UserView.js b/www/config/UserView.js
> index 4645737a..ae313776 100644
> --- a/www/config/UserView.js
> +++ b/www/config/UserView.js
> @@ -139,6 +139,8 @@ Ext.define('PBS.config.UserView', {
> xtype: 'proxmoxStdRemoveButton',
> baseurl: '/access/users/',
> enableFn: (rec) => rec.data.userid !== 'root@pam',
> + getUrl: (rec) =>
> + `/access/users/${encodeURIComponent(rec.getId())}`,
> callback: 'reload',
> },
> '-',
> diff --git a/www/window/UserEdit.js b/www/window/UserEdit.js
> index aaae835f..06ec5377 100644
> --- a/www/window/UserEdit.js
> +++ b/www/window/UserEdit.js
> @@ -20,7 +20,7 @@ Ext.define('PBS.window.UserEdit', {
> var baseurl = '/api2/extjs/access/users';
>
> me.isCreate = !userid;
> - me.url = userid ? baseurl + '/' + userid : baseurl;
> + me.url = userid ? baseurl + '/' + encodeURIComponent(userid) : baseurl;
> me.method = userid ? 'PUT' : 'POST';
> me.autoLoad = !!userid;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view
2021-01-19 13:33 [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view Oguz Bektas
2021-01-25 15:13 ` Dominik Csapak
@ 2021-01-26 9:54 ` Wolfgang Bumiller
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Bumiller @ 2021-01-26 9:54 UTC (permalink / raw)
To: Oguz Bektas; +Cc: pbs-devel
applied
On Tue, Jan 19, 2021 at 02:33:23PM +0100, Oguz Bektas wrote:
> userid parameter needs to be properly encoded when shown on the browser
>
> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
> www/config/UserView.js | 2 ++
> www/window/UserEdit.js | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/www/config/UserView.js b/www/config/UserView.js
> index 4645737a..ae313776 100644
> --- a/www/config/UserView.js
> +++ b/www/config/UserView.js
> @@ -139,6 +139,8 @@ Ext.define('PBS.config.UserView', {
> xtype: 'proxmoxStdRemoveButton',
> baseurl: '/access/users/',
> enableFn: (rec) => rec.data.userid !== 'root@pam',
> + getUrl: (rec) =>
> + `/access/users/${encodeURIComponent(rec.getId())}`,
> callback: 'reload',
> },
> '-',
> diff --git a/www/window/UserEdit.js b/www/window/UserEdit.js
> index aaae835f..06ec5377 100644
> --- a/www/window/UserEdit.js
> +++ b/www/window/UserEdit.js
> @@ -20,7 +20,7 @@ Ext.define('PBS.window.UserEdit', {
> var baseurl = '/api2/extjs/access/users';
>
> me.isCreate = !userid;
> - me.url = userid ? baseurl + '/' + userid : baseurl;
> + me.url = userid ? baseurl + '/' + encodeURIComponent(userid) : baseurl;
> me.method = userid ? 'PUT' : 'POST';
> me.autoLoad = !!userid;
>
> --
> 2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-26 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 13:33 [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view Oguz Bektas
2021-01-25 15:13 ` Dominik Csapak
2021-01-26 9:54 ` [pbs-devel] applied: " Wolfgang Bumiller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox