Skip to content

Commit

Permalink
Fix regex for checking private address format (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixers authored Jun 13, 2024
1 parent fe067db commit 8feac9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/js/background/components/email-autofill.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class EmailAutofill {
.then(async response => {
if (response.ok) {
return response.json().then(async ({ address }) => {
if (!/^[a-z0-9]+$/.test(address)) throw new Error('Invalid address')
if (!/^[a-z0-9-]+$/.test(address)) throw new Error('Invalid address')

this.settings.updateSetting('userData', Object.assign(userData, { nextAlias: `${address}` }))
// Reset attempts
Expand Down

0 comments on commit 8feac9a

Please sign in to comment.