mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
Merge pull request #4373 from fedepell/whitelist_empty_bug
[JENKINS-60278] Prevent Oops when Whitelisted Commands input is empty
This commit is contained in:
1 file changed
+1
-1
@@ -162,7 +162,7 @@ public class AdminWhitelistRule implements StaplerProxy {
|
||||
@RequirePOST
|
||||
public HttpResponse doSubmit(StaplerRequest req) throws IOException {
|
||||
StringBuilder whitelist = new StringBuilder(Util.fixNull(req.getParameter("whitelist")));
|
||||
if (whitelist.charAt(whitelist.length() - 1) != '\n')
|
||||
if ((whitelist.length() > 0) && (whitelist.charAt(whitelist.length() - 1) != '\n'))
|
||||
whitelist.append("\n");
|
||||
|
||||
Enumeration e = req.getParameterNames();
|
||||
|
||||
Reference in new issue
Block a user