[JIRA] (JENKINS-60278) Empty field in Whitelisted Commands will cause an Oops and prevent saving

4 views
Skip to first unread message

fede.evol@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:55:11 PM11/25/19
to jenkinsc...@googlegroups.com
Federico Pellegrin created an issue
 
Jenkins / Bug JENKINS-60278
Empty field in Whitelisted Commands will cause an Oops and prevent saving
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-11-26 02:54
Priority: Minor Minor
Reporter: Federico Pellegrin

If the "Currently Whitelisted Commands" in "Manage Jenkins → Configure Global Security →  Agent → Master Access Control" is left totally empty and form is submitted with the button "Update", then an Oops will occur:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:237)
   at java.lang.StringBuilder.charAt(StringBuilder.java:76)
   at jenkins.security.s2m.AdminWhitelistRule.doSubmit(AdminWhitelistRule.java:165)
   at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
   at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
   at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
   at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
   at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
   at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
   at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
   at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
   at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)

And no data will be saved.

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

fede.evol@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:58:03 PM11/25/19
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 9, 2019, 4:35:03 PM12/9/19
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Fixed
 

The fix was released in 2.208

Change By: Oleg Nenashev
Status: Open Resolved
Resolution: Fixed
Released As: Jenkins 2.208
Reply all
Reply to author
Forward
0 new messages