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

[deployer-framework] Extract inline script block and event handler in com/cloudbees/plugins/deployer/DeployNowRunAction/configure.jelly

      Problems

      == Inline Script Block
      Line: 83
      ----
      <script type="text/javascript">
                      x = 60;
                      function countdown() {
                        if (x > 1) {
                          x--;
                          document.getElementById("autoDeploy").innerHTML = x;
                          r = setTimeout("countdown()", 1000);
                        }
                        else {
                          clearTimeout(r);
                          document.getElementById("autoDeploy").innerHTML = 0;
                          if (document.forms["deploy"].onsubmit &amp;&amp; !document.forms["deploy"].onsubmit()) {
                            return;
                          }
                          document.forms["deploy"].submit();
                        }
                      }
      
                      r = setTimeout("countdown()", 1000);
                    </script>
      ----
      
      == Inline Event Handler
      Line: 78
      ----
      <a href="#"
                         onclick="clearTimeout(r); document.getElementById('autoDeployContainer').innerHTML=''; return false;">
      ----
      

      Solutions

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

          [JENKINS-74417] [deployer-framework] Extract inline script block and event handler in com/cloudbees/plugins/deployer/DeployNowRunAction/configure.jelly

          Basil Crow created issue -
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 78
          ----
          <a href="#"
                             onclick="clearTimeout(r); document.getElementById('autoDeployContainer').innerHTML=''; return false;">
          ----

          == Inline Script Block
          Line: 83
          ----
          <script type="text/javascript">
                          x = 60;
                          function countdown() {
                            if (x > 1) {
                              x--;
                              document.getElementById("autoDeploy").innerHTML = x;
                              r = setTimeout("countdown()", 1000);
                            }
                            else {
                              clearTimeout(r);
                              document.getElementById("autoDeploy").innerHTML = 0;
                              if (document.forms["deploy"].onsubmit &amp;&amp; !document.forms["deploy"].onsubmit()) {
                                return;
                              }
                              document.forms["deploy"].submit();
                            }
                          }

                          r = setTimeout("countdown()", 1000);
                        </script>
          ----

          == Inline Event Handler
          Line: 78
          ----
          <a href="#"
                             onclick="clearTimeout(r); document.getElementById('autoDeployContainer').innerHTML=''; return false;">
          ----

          == Inline Script Block
          Line: 83
          ----
          <script type="text/javascript">
                          x = 60;
                          function countdown() {
                            if (x > 1) {
                              x--;
                              document.getElementById("autoDeploy").innerHTML = x;
                              r = setTimeout("countdown()", 1000);
                            }
                            else {
                              clearTimeout(r);
                              document.getElementById("autoDeploy").innerHTML = 0;
                              if (document.forms["deploy"].onsubmit &amp;&amp; !document.forms["deploy"].onsubmit()) {
                                return;
                              }
                              document.forms["deploy"].submit();
                            }
                          }

                          r = setTimeout("countdown()", 1000);
                        </script>
          ----
          {noformat}

          h4. Solutions

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

          {noformat}
          == Inline Script Block
          Line: 83
          ----
          <script type="text/javascript">
                          x = 60;
                          function countdown() {
                            if (x > 1) {
                              x--;
                              document.getElementById("autoDeploy").innerHTML = x;
                              r = setTimeout("countdown()", 1000);
                            }
                            else {
                              clearTimeout(r);
                              document.getElementById("autoDeploy").innerHTML = 0;
                              if (document.forms["deploy"].onsubmit &amp;&amp; !document.forms["deploy"].onsubmit()) {
                                return;
                              }
                              document.forms["deploy"].submit();
                            }
                          }

                          r = setTimeout("countdown()", 1000);
                        </script>
          ----

          == Inline Event Handler
          Line: 78
          ----
          <a href="#"
                             onclick="clearTimeout(r); document.getElementById('autoDeployContainer').innerHTML=''; return false;">
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          Summary Original: [deployer-framework] Extract inline script blocks and event handlers in com/cloudbees/plugins/deployer/DeployNowRunAction/configure.jelly New: [deployer-framework] Extract inline script block and event handler in com/cloudbees/plugins/deployer/DeployNowRunAction/configure.jelly

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

              Created:
              Updated: