The private key's field is now excluded from the upload form's
JSON data if it's left empty.

Prior to this change, the form still used an empty string for the
private key's field, even if no key was provided by the user.
Because the key's field is marked as optional in the upload cert
API endpoint, JSONSchema validation would therefore fail.

Signed-off-by: Max Carrara <m.carr...@proxmox.com>
---
 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 29c17359..a086581c 100644
--- a/www/manager6/node/Certificates.js
+++ b/www/manager6/node/Certificates.js
@@ -171,6 +171,9 @@ Ext.define('PVE.node.CertUpload', {
        onGetValues: function(values) {
            values.restart = 1;
            values.force = 1;
+           if (!values.key) {
+               delete values.key;
+           }
            return values;
        },
        items: [
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to