Constrain signature uploads to PNG data (#2844)

This commit is contained in:
Vykos
2026-06-05 13:17:43 +02:00
committed by GitHub
parent 688194113b
commit 0b0d747f1c
4 changed files with 150 additions and 18 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ function _esc(s) {
function _safeSignatureDataUrl(raw) {
const value = String(raw || '').trim();
return /^data:image\/(?:png|jpe?g);base64,[a-z0-9+/=\s]+$/i.test(value) ? value : '';
return /^data:image\/png;base64,[a-z0-9+/=\s]+$/i.test(value) ? value : '';
}
// Last signature the user picked or created in this session. Lets the export