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

qmail-inject: fix header parse regression #229

Merged
merged 1 commit into from
Feb 15, 2022
Merged

Conversation

DerDakon
Copy link
Member

When attempting to catch incorrectly formatted headers like "To: foo: bar, baz" to avoid errors when injecting bounces the host expansion of headers like "To: root" was also broken.

Instead of completely ignoring these lines when the recipient list was already given on the command line using -a option try to process these lines as before, but allow the parsing of these lines to silently fail. If a broken line is encountered this now simply does not reformat them to insert the hostname.

Bug introduced in commit 56e7c4a in 1.08.

Fixes: #147

As I already said in that bug: I think we should just merge this without the tests so we can get a 1.09 out of the door. This fixes the regression, and when comparing the code before the breaking commit and this branch you see that it now only adds the "ignore errors" flag and routes the doordie() calls through a little helper that checks that flag. @schmonz verified that his usecase with the installed version now works.

@DerDakon DerDakon added the bug Something isn't working label Dec 23, 2021
@DerDakon DerDakon added this to the 1.09 milestone Dec 23, 2021
@DerDakon
Copy link
Member Author

Includes the changes from #231 to make the CI green.

@schmonz
Copy link
Member

schmonz commented Jan 20, 2022

Could you try rebasing onto #232? Guessing it'll be easy and then we can be really sure.

@schmonz
Copy link
Member

schmonz commented Jan 25, 2022

Now that #232 is reliably failing all the autobuilds like it should, I tried rebasing this onto it. On my local macOS, the new tests pass. If they do likewise in all the autobuilds, then I'm indeed comfortable merging this before #227 and #232.

@schmonz
Copy link
Member

schmonz commented Jan 28, 2022

schmonz-Dakon-inject-fix-with-qfilter-and-tests, a branch with this change rebased onto #232 (and therefore also #227), passes all our checks. We'd usually want to first merge the prerequisite-to-tests #227, then squash the tests from #232 onto this commit, then merge this. But #227 is sort-of-blocked on @bruceg issuing relicensed code. Having seen the tests pass is good enough for me for the moment, provided we don't forget to merge them as soon as we can. I approve this PR on its own, now.

When attempting to catch incorrectly formatted headers like "To: foo: bar, baz"
to avoid errors when injecting bounces the host expansion of headers like
"To: root" was also broken.

Instead of completely ignoring these lines when the recipient list was already
given on the command line using -a option try to process these lines as before,
but allow the parsing of these lines to silently fail. If a broken line is
encountered this now simply does not reformat them to insert the hostname.

Fixes: 56e7c4a
@DerDakon DerDakon merged commit e7e9fc5 into master Feb 15, 2022
@DerDakon DerDakon deleted the Dakon-inject-fix branch February 15, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in 1.08: recipient-address qualification
4 participants