api/ui: datastore: allow to set simple comment

for now forbid all control characters[0] in the comment value, the
section config writer cannot cope with newlines in the value, it
writes them out literally, allowing "injection" or breaking the whole
config.

In the webinterface use also a textfield, not a textarea.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2019-12-19 17:46:39 +01:00
parent e88e3c3a35
commit bca9093520
3 changed files with 11 additions and 6 deletions

View File

@ -111,8 +111,6 @@ Ext.define('PBS.DataStoreInputPanel', {
onGetValues: function(values) {
var me = this;
delete values.comment;
return values;
},
@ -139,8 +137,7 @@ Ext.define('PBS.DataStoreInputPanel', {
{
xtype: 'textfield',
name: 'comment',
emptyText: 'Not yet submitted...',
fieldLabel: gettext('Comment')
fieldLabel: gettext('Comment'),
},
],
});