Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60278

Empty field in Whitelisted Commands will cause an Oops and prevent saving

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 2.208

      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.

       

       

            fedepell Federico Pellegrin
            fedepell Federico Pellegrin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: