Merge branch 'security-stable-2.46' into security-stable-2.60

This commit is contained in:
Jesse Glick committed 2018-02-09 11:26:46 -05:00
commit 19b71d8d29
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -228,7 +228,7 @@ public abstract class Plugin implements Saveable {
String path = req.getRestOfPath();
String pathUC = path.toUpperCase(Locale.ENGLISH);
if (path.isEmpty() || path.contains("..") || path.contains("%") || pathUC.contains("META-INF") || pathUC.contains("WEB-INF")) {
if (path.isEmpty() || path.contains("..") || path.startsWith(".") || path.contains("%") || pathUC.contains("META-INF") || pathUC.contains("WEB-INF")) {
LOGGER.warning("rejecting possibly malicious " + req.getRequestURIWithQueryString());
rsp.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;