]> git.proxmox.com Git - pmg-gui.git/commitdiff
add missing encodeURIComponent
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 19 Feb 2019 11:33:01 +0000 (12:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 20 Feb 2019 08:19:59 +0000 (09:19 +0100)
some data contains special characters that might make problems in urls,
so encode them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/LDAPConfig.js
js/UserBlackWhiteList.js

index 8990847ee19693d4e8dbbe2f3e7847d47f54889a..172a75bfc93b73c8090bac780fec423859be1091 100644 (file)
@@ -269,7 +269,7 @@ Ext.define('PMG.LDAPConfig', {
                items: [{
                    xtype: 'pmgLDAPUserGrid',
                    border: false,
-                   url: '/api2/json/config/ldap/' + name + '/groups/' +  record.data.gid
+                   url: '/api2/json/config/ldap/' + name + '/groups/' +  encodeURIComponent(record.data.gid)
                }]
            }).show();
        },
@@ -297,7 +297,7 @@ Ext.define('PMG.LDAPConfig', {
                        field: ['email', 'primary'],
                        proxy: {
                            type: 'proxmox',
-                           url: '/api2/json/config/ldap/' + name + '/users/' +  record.data.pmail
+                           url: '/api2/json/config/ldap/' + name + '/users/' +  encodeURIComponent(record.data.pmail)
                        }
                    },
                    columns: [
index 3cc5adbf340e0f9fe69b49b907c48578030f0153..0e4a96e185bf1959b6918564a346f2e3e60e7102 100644 (file)
@@ -68,7 +68,7 @@ Ext.define('PMG.UserBlackWhiteList', {
            }
 
            var params = me.getStore().getProxy().getExtraParams() || {};
-           var url = '/quarantine/' + me.listname + '/' + rec.getId();
+           var url = '/quarantine/' + me.listname + '/' + encodeURIComponent(rec.getId());
 
            Proxmox.Utils.API2Request({
                url: url + '?' + Ext.Object.toQueryString(params),