diff --git a/CHANGELOG.md b/CHANGELOG.md index 6166bcc..da22c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Secret keys are now restricted to 128 bits (16 bytes) or 256 bits (32 bytes) +- The local part cannot contain the separator ## [0.2.0] - 2023-08-11 diff --git a/src/locales/en.json b/src/locales/en.json index 9a5ba50..843a77d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -43,6 +43,7 @@ "cameraNotReadable": "Camera not accessible (potentially already in use).", "cameraOverconstrained": "Installed cameras are not suitable.", "cameraStreamApiNotSupported": "Stream API is not supported in this browser.", + "localPartSeparator": "The local part cannot contain the separator.", "unknown": "Unknown error." } }, diff --git a/src/locales/fr.json b/src/locales/fr.json index db9cf68..90cdcd4 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -43,6 +43,7 @@ "cameraNotReadable": "Caméra inaccessible (potentiellement déjà utilisée).", "cameraOverconstrained": "Les caméras détectées ne sont pas compatibles.", "cameraStreamApiNotSupported": "L'API du flux de données vidéo n'est pas supportée par ce navigateur.", + "localPartSeparator": "La partie locale ne peut pas contenir le séparateur.", "unknown": "Erreur inconnue." } }, diff --git a/src/views/AddAccountView.vue b/src/views/AddAccountView.vue index da11f2b..6355aa6 100644 --- a/src/views/AddAccountView.vue +++ b/src/views/AddAccountView.vue @@ -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');