-
Task
-
Resolution: Unresolved
-
Minor
Problem
== Inline Script Block Line: 3 ---- <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '${it.profileId}']); <j:if test="${it.domainName!=null}"> <j:choose> <j:when test="${it.domainName=='none'}"> _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); </j:when> <j:otherwise> _gaq.push(['_setDomainName', '${it.domainName}']); </j:otherwise> </j:choose> </j:if> _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
[JENKINS-74486] [googleanalytics] Extract inline script block in WEB-INF/classes/hudson/plugins/google/analytics/GoogleAnalyticsPageDecorator/header.jelly
Assignee | Original: redsolo [ redsolo ] |
Description |
Original:
h4. Problems {noformat} == Inline Script Block Line: 3 ---- <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '${it.profileId}']); <j:if test="${it.domainName!=null}"> <j:choose> <j:when test="${it.domainName=='none'}"> _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); </j:when> <j:otherwise> _gaq.push(['_setDomainName', '${it.domainName}']); </j:otherwise> </j:choose> </j:if> _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ---- == Inline Script Block Line: 3 ---- <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '${it.profileId}']); <j:if test="${it.domainName!=null}"> <j:choose> <j:when test="${it.domainName=='none'}"> _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); </j:when> <j:otherwise> _gaq.push(['_setDomainName', '${it.domainName}']); </j:otherwise> </j:choose> </j:if> _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
New:
h4. Problem {noformat} == Inline Script Block Line: 3 ---- <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '${it.profileId}']); <j:if test="${it.domainName!=null}"> <j:choose> <j:when test="${it.domainName=='none'}"> _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); </j:when> <j:otherwise> _gaq.push(['_setDomainName', '${it.domainName}']); </j:otherwise> </j:choose> </j:if> _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
Summary | Original: [googleanalytics] Extract inline script blocks in WEB-INF/classes/hudson/plugins/google/analytics/GoogleAnalyticsPageDecorator/header.jelly | New: [googleanalytics] Extract inline script block in WEB-INF/classes/hudson/plugins/google/analytics/GoogleAnalyticsPageDecorator/header.jelly |