Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.0
-
None
-
None
Description
When a user uploads a PDF document to this URI:
which is the url-encoded form of
an HTTP 400 response is generated by Shiro with this as the body:
<html>
<head>
<title>Error</title>
</head>
<body>Invalid request</body>
</html>
With Shiro version 1.6.0 the upload worked. Digging through Shiro's code I found
org.apache.shiro.web.filter.InvalidRequestFilter line 67:
return !StringUtils.hasText(uri)
which means that a URI which is null or has zero length or consists only of whitespace should be considered a valid URI. I am pretty sure this is not what the author intended and that the "!" just needs to be removed to fix this bug.