Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for mail to invalid FTN address #505

Closed
wants to merge 3 commits into from
Closed

Fix for mail to invalid FTN address #505

wants to merge 3 commits into from

Conversation

AnthonyHarwood
Copy link

Added a handler to catch invalid FTN address, that was closing socket connection.

@AnthonyHarwood
Copy link
Author

To reproduce the issue, create a mail message and address it to 555

@cognitivegears
Copy link
Collaborator

@NuSkooler can you test this out? I don't have any fidonet networks configured.

// - Supported remote flavors such as FTN, email, ...
//
// :TODO: remove hard-coded FTN check here. We need a decent way to register global supported flavors with modules.
const addressedToInfo = getAddressedToInfo(data);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we're just catching a undefined/null. This can probably be switched to a less heavy if (!addressedToInfo) { }.

For the error itself, please use Errors.Invalid, e.g. Errors.Invalid('Invalid address')

@NuSkooler
Copy link
Owner

Thanks for catching this! I left a small comment for a tidy, but should be good to go after

@AnthonyHarwood
Copy link
Author

Closing this and submitting a simpler solution.

@AnthonyHarwood AnthonyHarwood deleted the bugfix/mail_to_invalid_ftn_address branch September 26, 2023 20:54
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.

3 participants