[eggplant-runner] Extract inline script blocks and event handlers in io/jenkins/plugins/eggplant/EggplantRunnerBuilder/config.jelly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 22
      ----
      <script>
                  function showPassword() {
                      document.querySelectorAll('*').forEach(function(node) {
                          if(node.id==="clientSecret"){
                              if(node.type ==="password"){
                                  node.type = "text";
                              }
                              else
                              {
                                  node.type = "password";
                              }
                          };
                          if(node.id==="ckBox"){
                              if (document.getElementById("clientSecret").type === "password"){
                                  node.checked = false;
                              }
                              else{
                                  node.checked = true;
                              }
                          }
                      });
                  }
              </script>
      ----
      
      == Inline Script Block
      Line: 45
      ----
      <script>
                  function doNotShowPassword(){
                      document.querySelectorAll('*').forEach(function(node) {
                          if(node.id==="clientSecret"){
                              node.type = "password";
                          }
                      });
                  }
              </script>
      ----
      
      == Inline Event Handler
      Line: 19
      ----
      <input type="checkbox" onclick="showPassword()" id="ckBox"/>
      ----
      
      == Inline Event Handler
      Line: 20
      ----
      <iframe onload="doNotShowPassword()" style="display:none" />
      ----
      

      Solutions

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

            Assignee:
            Unassigned
            Reporter:
            Basil Crow
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: