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

Computer.addAction will throw UnsupportedOperationException

      The fix of JENKINS-39555 (in 2.30) reverted some of the code introduced in JENKINS-39404, to fix some regressions there. Unfortunately it failed to revert one of the simplifications that was legitimately made in JENKINS-39404 to code originally introduced in JENKINS-18224: so now Computer.addAction is again inherited from Actionable, but will not work since getActions is an immutable list.

      Probably no one noticed this before because no one was trying to call Computer.addAction, but egutierrez noticed that yesterday's security release of ssh-slaves by mc1arke introduced code which does, and which causes a failure in TrustHostKeyActionTest.testSubmitNotAuthorised when run against 2.32.3:

      java.lang.UnsupportedOperationException
      	at java.util.Collections$UnmodifiableCollection.add(Collections.java:1055)
      	at hudson.model.Actionable.addAction(Actionable.java:134)
      	at hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy.verify(ManuallyTrustedKeyVerificationStrategy.java:70)
      

          [JENKINS-42969] Computer.addAction will throw UnsupportedOperationException

          Jesse Glick created issue -
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue blocks SECURITY-161 [ SECURITY-161 ]
          Jesse Glick made changes -
          Link New: This issue blocks JENKINS-39555 [ JENKINS-39555 ]
          Jesse Glick made changes -
          Link New: This issue blocks JENKINS-42968 [ JENKINS-42968 ]
          Jesse Glick made changes -
          Description Original: The fix of JENKINS-39555 (in 2.30) reverted some of the code introduced in JENKINS-39404, to fix some regressions there. Unfortunately it failed to revert one of the simplifications that was legitimately made in JENKINS-39404 to code originally introduced in JENKINS-18224: so now {{Computer.addAction}} is again inherited from {{Actionable}}, but will not work since {{getActions}} is an immutable list.

          Probably no one noticed this before because no one was trying to call {{Computer.addAction}}, but [~egutierrez] noticed that yesterday's security release of {{ssh-slaves}} introduced code which does, and which causes a failure in {{TrustHostKeyActionTest.testSubmitNotAuthorised}} when run against 2.32.3.
          New: The fix of -JENKINS-39555- (in 2.30) reverted some of the code introduced in -JENKINS-39404-, to fix some regressions there. Unfortunately it failed to revert one of the simplifications that was legitimately made in -JENKINS-39404- to code originally introduced in -JENKINS-18224-: so now {{Computer.addAction}} is again inherited from {{Actionable}}, but will not work since {{getActions}} is an immutable list.

          Probably no one noticed this before because no one was trying to call {{Computer.addAction}}, but [~egutierrez] noticed that yesterday's security release of {{ssh-slaves}} by [~mc1arke] introduced code which does, and which causes a failure in {{TrustHostKeyActionTest.testSubmitNotAuthorised}} when run against 2.32.3:

          {code:none}
          java.lang.UnsupportedOperationException
          at java.util.Collections$UnmodifiableCollection.add(Collections.java:1055)
          at hudson.model.Actionable.addAction(Actionable.java:134)
          at hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy.verify(ManuallyTrustedKeyVerificationStrategy.java:70)
          {code}

          Daniel Beck added a comment -

          Is there a change in the plugin possible to make this work for current LTS users?

          Daniel Beck added a comment - Is there a change in the plugin possible to make this work for current LTS users?
          Jesse Glick made changes -
          Remote Link New: This issue links to "ssh-slaves PR 50 (Web Link)" [ 15742 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 2819 (Web Link)" [ 15743 ]
          Jesse Glick made changes -
          Priority Original: Blocker [ 1 ] New: Critical [ 2 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: