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

[artifactory] Extract inline script block and event handlers in lib/jfrog/customRadioButton.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 33
      ----
      <script>
              document.addEventListener("DOMContentLoaded", function () {
                  let deployPatternAreaLength = document.getElementById('deployPatternArea-${uniqueId}').getElementsByTagName('textarea')[0].value.length;
                  let resolvePatternAreaLength = document.getElementById('resolvePatternArea-${uniqueId}').getElementsByTagName('textarea')[0].value.length;
                  setSpecView('${instance[field]}', resolvePatternAreaLength, deployPatternAreaLength, '${uniqueId}');
              });
          </script>
      ----
      
      == Inline Event Handler
      Line: 25
      ----
      <input type="radio" name="${field}" onclick="${onclick}('true', '${uniqueId}')"
                 id="${field}_true-${uniqueId}"
                 value="true" checked="${booleanValue ? 'true' : null}" style="margin-left: 20px; top: .0em"/>
      ----
      
      == Inline Event Handler
      Line: 29
      ----
      <input type="radio" name="${field}" onclick="${onclick}('false', '${uniqueId}')"
                 id="${field}_false-${uniqueId}"
                 value="false" checked="${booleanValue ? null : 'true'}" style="margin-left: 20px; top: .0em"/>
      ----
      

      Solutions

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

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

              Created:
              Updated: