OWASP / java-html-sanitizer

Takes third-party HTML and produces HTML that is safe to embed in your web application. Fast and easy to configure.
Other
834 stars 209 forks source link

org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'issueModel' is not present #281

Open bhargavivuttaravilli123 opened 1 year ago

bhargavivuttaravilli123 commented 1 year ago

Hi,

I am using Java Html Sanitizer for sanitizing the content entered by the user. But while sanitizing the request body i am receiving below error.

Required request part 'issueModel' is not present.

REQUEST: Content-Disposition: form-data; name="issueModel"; filename="blob" Content-Type: application/json

{"issueType":{"id":"a211-482f-97a1"},"issueId":"8530-4e64-b6ba","issueProperties":{"defaultAttr":{"caseHead":"Querty","description":"Querty 1999"}}}

After sanitization: Content-Disposition: form-data; name="issueModel"; filename="blob" Content-Type: application/json

{"issueType":{"id":"a211-482f-97a1"},"issueId":&#8530-4e64-b6ba","issueProperties":{"defaultAttr":{"issueHead":"Querty ","description":"Querty 1999 "}}}

jmanico commented 1 year ago

This project is meant to sanitize small sections of user submitted HTML from WYSIWYG editors. It is not meant to sanitize full requests.On May 11, 2023, at 7:42 PM, bhargavivuttaravilli123 @.***> wrote: Hi, I am using Java Html Sanitizer for sanitizing the content entered by the user. But while sanitizing the request body i am receiving below error. Required request part 'issueModel' is not present. REQUEST: Content-Disposition: form-data; name="issueModel"; filename="blob" Content-Type: application/json {"issueType":{"id":"a211-482f-97a1"},"issueId":"8530-4e64-b6ba","issueProperties":{"defaultAttr":{"caseHead":"Querty","description":"Querty 1999"}}} After sanitization: Content-Disposition: form-data; name="issueModel"; filename="blob" Content-Type: application/json {"issueType":{"id":"a211-482f-97a1"},"issueId":&#8530-4e64-b6ba","issueProperties":{"defaultAttr":{"issueHead":"Querty ","description":"Querty 1999 "}}}

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>