Skip to content

Commit 6983496

Browse files
committed
feat: block subdomains of disposable email domains in isDisposableEmail
1 parent 9ce8767 commit 6983496

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/security.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export async function isDisposableEmail(email) {
3535
if (parts.length !== 2) return false;
3636
const domain = parts[1].toLowerCase().trim();
3737
const domains = await loadDisposableDomains();
38-
return domains.has(domain);
38+
return domains.has(domain) || [...domains].some(d => domain.endsWith('.' + d));
3939
}
4040

4141
export async function checkPasswordBreach(password) {

0 commit comments

Comments
 (0)