Attaching a file with quotes in the name doesn't work #14158

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@raindrift

Here's a failing spec that demonstrates this case.

Expected behavior: Either the file is attached with the quotes properly escaped in the Content-Disposition, or an exception is thrown.
Actual behavior: The attachment is not added to the attachments list.

I'm not sure how best to fix this, but this test case should at least isolate the problem.

Thanks!

Contributor

Your beef lies with the mail gem, probably somewhere in this file: https://github.com/mikel/mail/blob/master/lib/mail/attachments_list.rb

ActionMailer is just a wrapper around it.

Contributor
jamo commented Feb 22, 2014

I'll take a look if I can fix this. (unless you wanted to fix this - I first red that you just wanted to provide the failing test...)

Edit: I have almost fixed this...
It seems that modifying it here: https://github.com/mikel/mail/blob/master/lib/mail/encodings.rb#L98-L109 fixes it (but introduces new errors)

@jeremy jeremy closed this Apr 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment