Benoit Tellier created JAMES-4011:
-------------------------------------

             Summary: StripAttachment fails for unquoted filenames with space
                 Key: JAMES-4011
                 URL: https://issues.apache.org/jira/browse/JAMES-4011
             Project: James Server
          Issue Type: Bug
          Components: Mailet Contributions
            Reporter: Benoit Tellier



{code:java}
--------------gwA6NAbT8Pk0FYCy0yoPh61m
Content-Type: application/pdf
Content-Disposition: attachment; filename=Vietnam Airline.pdf
Content-Transfer-Encoding: base64

JVBERi0xLjUKJbXtrvsKMyAwIG9iago8PCAvTGVuZ3RoIDQgMCBSCiAgIC9GaWx0ZXIgL0Zs
{code}

triggers the following logs:

{code:java}
javax.mail.internet.ParseException: In parameter list <; filename=Vietnam 
Airline.pdf>, expected ';', got "Airline.pdf"
        at javax.mail.internet.ParameterList.<init>(ParameterList.java:314)
        at 
javax.mail.internet.ContentDisposition.<init>(ContentDisposition.java:109)
        at javax.mail.internet.MimeBodyPart.getFileName(MimeBodyPart.java:1294)
        at javax.mail.internet.MimeBodyPart.getFileName(MimeBodyPart.java:549)
        at 
org.apache.james.transport.mailets.StripAttachment.getFilename(StripAttachment.java:379)
        at 
org.apache.james.transport.mailets.StripAttachment.shouldBeRemoved(StripAttachment.java:312)
        at 
org.apache.james.transport.mailets.StripAttachment.processMultipartPartMessage(StripAttachment.java:288)
        at 
org.apache.james.transport.mailets.StripAttachment.service(StripAttachment.java:229)
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to