-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
e557386
to
a87da64
Compare
Includes the changes from #231 to make the CI green. |
6af938c
to
5faf063
Compare
Could you try rebasing onto #232? Guessing it'll be easy and then we can be really sure. |
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
5faf063
to
e7e9fc5
Compare
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.