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

[pollscm] Extract inline script block and event handler in org/jenkinsci/plugins/pollscm/PollNowAction/action.jelly

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • pollscm-plugin

      Problems

      == Inline Script Block
      Line: 35
      ----
      <script>
                  function poll_${id}(a) {
                      fetch(a.href, {
                        method: "post",
                        headers: crumb.wrap({}),
                      });
                      hoverNotification('${%Poll scheduled}',a.parentNode);
                      return false;
                  }
              </script>
      ----
      
      == Inline Event Handler
      Line: 33
      ----
      <l:task icon="${icon}" title="${action.displayName}"
                      href="${h.getActionUrl(it.url,action)}/polling" onclick="${'return poll_' + id + '(this)'}" post="true"/>
      ----
      

      Solutions

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

          [JENKINS-74199] [pollscm] Extract inline script block and event handler in org/jenkinsci/plugins/pollscm/PollNowAction/action.jelly

          Basil Crow created issue -
          Basil Crow made changes -
          Assignee Original: Vincent Latombe [ vlatombe ]
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 33
          ----
          <l:task icon="${icon}" title="${action.displayName}"
                          href="${h.getActionUrl(it.url,action)}/polling" onclick="${'return poll_' + id + '(this)'}" post="true"/>
          ----

          == Inline Script Block
          Line: 35
          ----
          <script>
                      function poll_${id}(a) {
                          fetch(a.href, {
                            method: "post",
                            headers: crumb.wrap({}),
                          });
                          hoverNotification('${%Poll scheduled}',a.parentNode);
                          return false;
                      }
                  </script>
          ----

          == Inline Event Handler
          Line: 33
          ----
          <l:task icon="${icon}" title="${action.displayName}"
                          href="${h.getActionUrl(it.url,action)}/polling" onclick="${'return poll_' + id + '(this)'}" post="true"/>
          ----

          == Inline Script Block
          Line: 35
          ----
          <script>
                      function poll_${id}(a) {
                          fetch(a.href, {
                            method: "post",
                            headers: crumb.wrap({}),
                          });
                          hoverNotification('${%Poll scheduled}',a.parentNode);
                          return false;
                      }
                  </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: 35
          ----
          <script>
                      function poll_${id}(a) {
                          fetch(a.href, {
                            method: "post",
                            headers: crumb.wrap({}),
                          });
                          hoverNotification('${%Poll scheduled}',a.parentNode);
                          return false;
                      }
                  </script>
          ----

          == Inline Event Handler
          Line: 33
          ----
          <l:task icon="${icon}" title="${action.displayName}"
                          href="${h.getActionUrl(it.url,action)}/polling" onclick="${'return poll_' + id + '(this)'}" post="true"/>
          ----
          {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: [pollscm] Extract inline script blocks and event handlers in org/jenkinsci/plugins/pollscm/PollNowAction/action.jelly New: [pollscm] Extract inline script block and event handler in org/jenkinsci/plugins/pollscm/PollNowAction/action.jelly
          Shlomo made changes -
          Assignee New: Shlomo [ shlomo_dahan ]
          Shlomo made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Shlomo made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Shlomo made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 30465 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Mark Waite made changes -
          Released As New: https://github.com/jenkinsci/pollscm-plugin/releases/tag/pollscm-1.8
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: