Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.3.2, 7.3.6, 7.3.7, 8.5.2
-
None
-
7.03
-
25
-
Severity 3 - Minor
-
4
-
Description
Summary
While viewing attachment with whitespace, the following stack trace will be shown:
2017-05-12 20:17:42,685 http-nio-8736-exec-21 ERROR anonymous 1217x2612x1 - 10.60.2.77 /secure/attachment/12502/New_Text%20Document.pdf [c.a.j.web.servlet.ViewAttachmentServlet] Error serving file for path /12502/New_Text Document.pdf: Illegal character in path at index 33: /secure/attachment/12502/New_Text Document.pdf java.lang.IllegalArgumentException: Illegal character in path at index 33: /secure/attachment/12502/New_Text Document.pdf at java.net.URI.create(URI.java:852) at com.atlassian.web.servlet.plugin.ResolvingServletForwarder.resolve(ResolvingServletForwarder.java:42) at com.atlassian.web.servlet.plugin.ResolvingServletForwarder.forwardSafely(ResolvingServletForwarder.java:52) at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.lambda$null$0(RedirectInterceptingResponse.java:43) at java.util.Optional.map(Optional.java:215) at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.lambda$sendRedirect$1(RedirectInterceptingResponse.java:43) at java.util.Optional.flatMap(Optional.java:241) at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.sendRedirect(RedirectInterceptingResponse.java:43) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) ... 1 filtered at com.atlassian.jira.web.servlet.AbstractViewFileServlet.redirectForSecurityBreach(AbstractViewFileServlet.java:75) at com.atlassian.jira.web.servlet.AbstractViewFileServlet.streamFileData(AbstractViewFileServlet.java:129) at com.atlassian.jira.web.servlet.AbstractViewFileServlet.doGet(AbstractViewFileServlet.java:54) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ... 19 filtered .... Caused by: java.net.URISyntaxException: Illegal character in path at index 33: /secure/attachment/12502/New_Text Document.pdf at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parseHierarchical(URI.java:3105) at java.net.URI$Parser.parse(URI.java:3063) at java.net.URI.<init>(URI.java:588) ... 266 more
Steps to reproduce the problem:
- Upload an attachment with whitespace in the name (eg: New_Text Document.pdf)
- Open Internet Explorer and try to view the file from the issue page.
Environment
JIRA : JIRA 7.3.6, JIRA 7.3.2
Internet Browser : Internet Explorer 11
Expected Results
Attachment is shown/downloaded without the URI error
Actual Results
Attachment is viewable without any problem but the URI error is logged in JIRA's log.
Workaround
The problem does not affect whether the attachment can be viewed. For users with reverse proxy, the error message can be suppressed by following suggestion here
Attachments
Issue Links
- relates to
-
JRASERVER-68543 Error in logs while viewing pdf attachment in Chrome
- Gathering Impact
- mentioned in
-
Page Loading...