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

[libvirt-slave] Extract inline event handlers and migrate legacy checkUrl attributes in hudson/plugins/libvirt/VirtualMachineSlave/configure-entries.jelly

      Problems

      == Legacy checkUrl
      Line: 45
      ----
      checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupWaitingPeriodSeconds?secsValue='+this.value"
      ----
      
      == Legacy checkUrl
      Line: 49
      ----
      checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupTimesToRetryOnFailure?retriesValue='+this.value"
      ----
      
      == Inline Event Handler
      Line: 5
      ----
      <f:select onblur="updateListBox(document.getElementsByName('virtualMachineName')[0],'${rootURL}/plugin/libvirt-slave/computerNameValues?value='+encode(this.value))"/>
      ----
      
      == Inline Event Handler
      Line: 9
      ----
      <select class="setting-input" name="virtualMachineName" value="${instance.virtualMachineName}" onblur="snapshotsList='${rootURL}/plugin/libvirt-slave/snapshotNameValues?vm='+encode(this.value)+'&amp;hypervisor='+encode(document.getElementsByName('_.hypervisorDescription')[0].options[document.getElementsByName('_.hypervisorDescription')[0].selectedIndex].text); updateListBox(document.getElementsByName('snapshotName')[0], snapshotsList); updateListBox(document.getElementsByName('beforeJobSnapshotName')[0], snapshotsList)">
      ----
      

      Solutions

      https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers
      https://www.jenkins.io/doc/developer/security/csp/#legacy-javascript-checkurl-validation

          [JENKINS-74420] [libvirt-slave] Extract inline event handlers and migrate legacy checkUrl attributes in hudson/plugins/libvirt/VirtualMachineSlave/configure-entries.jelly

          Basil Crow created issue -
          Basil Crow made changes -
          Assignee Original: Bastian Germann [ bgermann ]
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 5
          ----
          <f:select onblur="updateListBox(document.getElementsByName('virtualMachineName')[0],'${rootURL}/plugin/libvirt-slave/computerNameValues?value='+encode(this.value))"/>
          ----

          == Inline Event Handler
          Line: 9
          ----
          <select class="setting-input" name="virtualMachineName" value="${instance.virtualMachineName}" onblur="snapshotsList='${rootURL}/plugin/libvirt-slave/snapshotNameValues?vm='+encode(this.value)+'&amp;hypervisor='+encode(document.getElementsByName('_.hypervisorDescription')[0].options[document.getElementsByName('_.hypervisorDescription')[0].selectedIndex].text); updateListBox(document.getElementsByName('snapshotName')[0], snapshotsList); updateListBox(document.getElementsByName('beforeJobSnapshotName')[0], snapshotsList)">
          ----

          == Legacy checkUrl
          Line: 45
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupWaitingPeriodSeconds?secsValue='+this.value"
          ----

          == Legacy checkUrl
          Line: 49
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupTimesToRetryOnFailure?retriesValue='+this.value"
          ----

          == Inline Event Handler
          Line: 5
          ----
          <f:select onblur="updateListBox(document.getElementsByName('virtualMachineName')[0],'${rootURL}/plugin/libvirt-slave/computerNameValues?value='+encode(this.value))"/>
          ----

          == Inline Event Handler
          Line: 9
          ----
          <select class="setting-input" name="virtualMachineName" value="${instance.virtualMachineName}" onblur="snapshotsList='${rootURL}/plugin/libvirt-slave/snapshotNameValues?vm='+encode(this.value)+'&amp;hypervisor='+encode(document.getElementsByName('_.hypervisorDescription')[0].options[document.getElementsByName('_.hypervisorDescription')[0].selectedIndex].text); updateListBox(document.getElementsByName('snapshotName')[0], snapshotsList); updateListBox(document.getElementsByName('beforeJobSnapshotName')[0], snapshotsList)">
          ----

          == Legacy checkUrl
          Line: 45
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupWaitingPeriodSeconds?secsValue='+this.value"
          ----

          == Legacy checkUrl
          Line: 49
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupTimesToRetryOnFailure?retriesValue='+this.value"
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          [https://www.jenkins.io/doc/developer/security/csp/#legacy-javascript-checkurl-validation]
          New: h4. Problems

          {noformat}
          == Legacy checkUrl
          Line: 45
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupWaitingPeriodSeconds?secsValue='+this.value"
          ----

          == Legacy checkUrl
          Line: 49
          ----
          checkUrl="'${rootURL}/plugin/libvirt-slave/checkStartupTimesToRetryOnFailure?retriesValue='+this.value"
          ----

          == Inline Event Handler
          Line: 5
          ----
          <f:select onblur="updateListBox(document.getElementsByName('virtualMachineName')[0],'${rootURL}/plugin/libvirt-slave/computerNameValues?value='+encode(this.value))"/>
          ----

          == Inline Event Handler
          Line: 9
          ----
          <select class="setting-input" name="virtualMachineName" value="${instance.virtualMachineName}" onblur="snapshotsList='${rootURL}/plugin/libvirt-slave/snapshotNameValues?vm='+encode(this.value)+'&amp;hypervisor='+encode(document.getElementsByName('_.hypervisorDescription')[0].options[document.getElementsByName('_.hypervisorDescription')[0].selectedIndex].text); updateListBox(document.getElementsByName('snapshotName')[0], snapshotsList); updateListBox(document.getElementsByName('beforeJobSnapshotName')[0], snapshotsList)">
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          [https://www.jenkins.io/doc/developer/security/csp/#legacy-javascript-checkurl-validation]

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: