-
Notifications
You must be signed in to change notification settings - Fork 559
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 Multipart form processing: IllegalArgumentException: File path not allowed #205
Conversation
…t form as it will reject almost anything a user might put there. Just use the base filename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add null and null bytes check?
...rc/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsProxyHttpServletRequest.java
Show resolved
Hide resolved
I changed the |
Could you post the stack trace @acbron? |
The method for calling is like:
However, I can guarantee there are no any NPE caused by my code, and it works fine in my local env. This happens only after i deployed it to API Gateway + lambda. |
Thanks @acbron. I'll try to replicate. |
Hey @acbron, I have been able to replicate this. It is indeed a bug. However, it is not related to this PR. The issue is caused by the fact that Spring tries to fetch the |
Do not call SecurityUtils.getValidFilePath when processing a Multipart form as it will reject almost anything a user might put there. Just use the base filename