test the contestant address field for validity

main
SI 2024-04-05 02:26:00 +02:00
parent 512ecf13d6
commit 1eb8b5d97e
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@
} else { } else {
outpObscuredFlag.value = addressFromKey(k); outpObscuredFlag.value = addressFromKey(k);
var m = inpContestantAddress.value; var m = inpContestantAddress.value;
if (m.slice(0, 2) !== "0x") { if (!/^0x[0-9a-fA-F]{40}$/.test(m)) {
outpSignature.value = ""; outpSignature.value = "";
} else { } else {
outpSignature.value = signMessage(m, k); outpSignature.value = signMessage(m, k);