ui: add missing uri encoding in user edit and view
userid parameter needs to be properly encoded when shown on the browser Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
6864fd0149
commit
d43265b7f1
@ -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',
|
||||
},
|
||||
'-',
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user