[pve-devel] [RFC many v2 00/12] notifications: add support for webhook endpoints

Lukas Wagner l.wagner at proxmox.com
Mon Jul 22 14:29:51 CEST 2024



On  2024-07-22 14:10, Stefan Hanreich wrote:
> I got the following JS error when trying to save a secret/header/body
> template with the content: `qweqwe   ßẞuuuu`
> 
> Uncaught DOMException: String contains an invalid character
>     getValue https://10.101.110.1:8007/widgettoolkit/proxmoxlib.js:11924
>     each ExtJS
>     getValue https://10.101.110.1:8007/widgettoolkit/proxmoxlib.js:11920
>     checkChange ExtJS
>     itemChange https://10.101.110.1:8007/widgettoolkit/proxmoxlib.js:12009
>     ExtJS 22
> proxmoxlib.js:11924
> 
> 
> Seems like the issue is with btoa and uppercase scharfes S?
> When using Umlauts, I at least get an error message, but cannot save.
> 
> 
> Other than that everything worked fine - consider this:
> Tested-By: Stefan Hanreich <s.hanreich at proxmox.com>
> 

Thanks a lot for testing, Stefan.

Indeed it looks like btoa has problems with unicode characters.
Luckily, MDN [1] has got our back with that one. I'll use that workaround
in an upcoming v3.

[1] https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem

-- 
- Lukas




More information about the pve-devel mailing list