Skip to content

Guard allow_listed? and disposable_domain? against unparseable addresses#317

Open
SAY-5 wants to merge 1 commit into
micke:mainfrom
SAY-5:guard-allow-disposable-unparseable
Open

Guard allow_listed? and disposable_domain? against unparseable addresses#317
SAY-5 wants to merge 1 commit into
micke:mainfrom
SAY-5:guard-allow-disposable-unparseable

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 17, 2026

Copy link
Copy Markdown

Fixes #316.

allow_listed? and disposable_domain? call address.domain directly, so they raise NoMethodError when the address could not be parsed and @address is nil (for example ValidEmail2::Address.new('"><test>')). deny_listed? already guards with valid?, so this mirrors that and returns false for unparseable addresses instead of crashing.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NoMethodError in allow_listed? and disposable_domain? when address is unparseable

1 participant