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

[summary_report] Extract inline script blocks in hudson/plugins/summary_report/ACIPluginBuildAction/componentTabs.jelly

XMLWordPrintable

      Note

      While testing this plugin, evaluate whether the third-party libraries in src/main/webapp are compatible with CSP in restrictive mode. The plugin may need to be upgraded from jQuery 1.x to 3.x to fully function in CSP restrictive mode.

      Problems

      == Inline Script Block
      Line: 3
      ----
      <script type="text/javascript">
              <!-- Function who create tabs -->
              function create_tabs(tabName){
                 jQuery(function (){
                    var cookieName = tabName;
                    jQuery(tabName).tabs({
      
                          selected: ( jQuery.cookies.get( cookieName ) || 0 ),
                          select: function( e, ui )
                          {
                                  jQuery.cookies.set( cookieName, ui.index );
                          }
      
                      } );
                 })
              }
          </script>
      ----
      
      == Inline Script Block
      Line: 21
      ----
      <script type="text/javascript">
              create_tabs('#tabs${projectname}'+${buildnumber}+${indexA}+${indexB});
          </script>
      ----
      

      Solution

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

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

              Created:
              Updated: