From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup] ui: add missing uri encoding in user edit and view
Date: Mon, 25 Jan 2021 16:13:06 +0100 [thread overview]
Message-ID: <e6cafd35-f865-a469-5a7b-0ae328102b47@proxmox.com> (raw)
In-Reply-To: <20210119133323.1420136-1-o.bektas@proxmox.com>
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;
>
>
next prev parent reply other threads:[~2021-01-25 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 13:33 Oguz Bektas
2021-01-25 15:13 ` Dominik Csapak [this message]
2021-01-26 9:54 ` [pbs-devel] applied: " Wolfgang Bumiller
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=e6cafd35-f865-a469-5a7b-0ae328102b47@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-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