Do not accept the separator in the local part

This commit is contained in:
Rodolphe Bréard 2023-08-25 10:13:50 +02:00
parent 72bc29ba66
commit 0dc94a7edd
4 changed files with 6 additions and 0 deletions

View file

@ -47,6 +47,9 @@ const addAccount = () => {
if (separator.value.length != 1) {
throw new Error('addAccount.error.invalidSeparator');
}
if (localPart.value.includes(separator.value)) {
throw new Error('addAccount.error.localPartSeparator');
}
const key = base64Decode(privateKey.value);
if (!authorizedKeyLengths.includes(key.length)) {
throw new Error('addAccount.error.invalidKeyLength');