* [pbs-devel] [PATCH proxmox-backup v4] restrict consent-banner text length
@ 2025-04-10 8:20 Gabriel Goller
2025-04-10 9:42 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2025-04-10 8:20 UTC (permalink / raw)
To: pbs-devel
Add a maxLength in of 64*1024 in the frontend and the api. We allow
a max body size of 512*1024 in the api (with patch [0]) so we should be
fine.
[0]: https://git.proxmox.com/?p=proxmox.git;a=commit;h=cf9e6c03a092acf8808ce83dad9249414fe4d588
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
v4:
- changed to 64kB on frontend and api, so that we have the same limits
as in pve
v3:
- forgot to update the actual number in code
v2, thanks @Thomas:
- limit consent-text in the api as well
- set the limit according to the max body size
src/config/node.rs | 5 +++++
www/config/NodeOptionView.js | 3 +++
2 files changed, 8 insertions(+)
diff --git a/src/config/node.rs b/src/config/node.rs
index 2b29cb02afed..fb6b182dbc53 100644
--- a/src/config/node.rs
+++ b/src/config/node.rs
@@ -174,6 +174,11 @@ pub enum Translation {
"description" : {
optional: true,
schema: MULTI_LINE_COMMENT_SCHEMA,
+ },
+ "consent-text" : {
+ optional: true,
+ type: String,
+ max_length: 64 * 1024,
}
},
)]
diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
index c327356f7f24..5fd17d804ec0 100644
--- a/www/config/NodeOptionView.js
+++ b/www/config/NodeOptionView.js
@@ -59,6 +59,9 @@ Ext.define('PBS.NodeOptionView', {
name: 'consent-text',
text: gettext('Consent Text'),
deleteEmpty: true,
+ fieldOpts: {
+ maxLength: 64 * 1024,
+ },
onlineHelp: 'consent_banner',
},
],
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup v4] restrict consent-banner text length
2025-04-10 8:20 [pbs-devel] [PATCH proxmox-backup v4] restrict consent-banner text length Gabriel Goller
@ 2025-04-10 9:42 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-04-10 9:42 UTC (permalink / raw)
To: pbs-devel, Gabriel Goller
On Thu, 10 Apr 2025 10:20:52 +0200, Gabriel Goller wrote:
> Add a maxLength in of 64*1024 in the frontend and the api. We allow
> a max body size of 512*1024 in the api (with patch [0]) so we should be
> fine.
>
> [0]: https://git.proxmox.com/?p=proxmox.git;a=commit;h=cf9e6c03a092acf8808ce83dad9249414fe4d588
>
>
> [...]
Applied, thanks!
[1/1] restrict consent-banner text length
commit: 427c687e35d964d881a6de6a38c841d0ac7f3043
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10 8:20 [pbs-devel] [PATCH proxmox-backup v4] restrict consent-banner text length Gabriel Goller
2025-04-10 9:42 ` [pbs-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal