On March 3, 2023 6:57 pm, Max Carrara wrote: > The private key's field is now excluded from the upload form's > JSON data if it's considered empty by Ext.js. > > Prior to this change, the form still sent an empty string if no > private key was provided by the user, even though the private key's > field is marked as optional in `pve-manager/PVE/API2/Certificates.pm`, > causing the JSONSchema validation to fail. > > Signed-off-by: Max Carrara <[email protected]>
Reviewed-by: Fabian Grünbichler <[email protected]> didn't apply for now, as without the additional check it actually makes the pitfall a bit worse ;) > --- > www/manager6/node/Certificates.js | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/www/manager6/node/Certificates.js > b/www/manager6/node/Certificates.js > index 34013b44..84fc12ff 100644 > --- a/www/manager6/node/Certificates.js > +++ b/www/manager6/node/Certificates.js > @@ -173,6 +173,9 @@ Ext.define('PVE.node.CertUpload', { > emptyText: gettext('No change'), > name: 'key', > xtype: 'textarea', > + getSubmitValue: function() { > + return this.getValue() || null; > + }, > }, > { > xtype: 'filebutton', > -- > 2.30.2 > > > > _______________________________________________ > pve-devel mailing list > [email protected] > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > > > _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
