mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
Merge branch 'security-stable-2.73' into security-stable-2.89
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -44,6 +44,7 @@ import com.thoughtworks.xstream.XStream;
|
||||
import hudson.init.Initializer;
|
||||
import hudson.init.Terminator;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
|
||||
@@ -226,7 +227,8 @@ public abstract class Plugin implements Saveable {
|
||||
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
|
||||
String path = req.getRestOfPath();
|
||||
|
||||
if (path.isEmpty() || path.contains("..") || path.contains("%") || path.contains("META-INF") || path.contains("WEB-INF")) {
|
||||
String pathUC = path.toUpperCase(Locale.ENGLISH);
|
||||
if (path.isEmpty() || path.contains("..") || path.contains("%") || pathUC.contains("META-INF") || pathUC.contains("WEB-INF")) {
|
||||
LOGGER.warning("rejecting possibly malicious " + req.getRequestURIWithQueryString());
|
||||
rsp.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user