Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove spaces and EOL from nonce attr #24644

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Jul 10, 2023

SUMMARY

Removes unnecessary spaces and EOLs from the script nonce attribute:

Previously script tag were being rendered as:



"></script>
--
"></script>
  
    <script src="[/static/assets/thumbnail.3acfb90e.entry.js](http://localhost:8100/static/assets/thumbnail.3acfb90e.entry.js)" async nonce="
    
        LTZ2aXQ-mDk_ji2S9x7upY6EJqekmaVY
    
"></script>

After:



<!-- Bundle js spa START -->
<!-- Bundle js spa START -->
  
    <script src="[/static/assets/vendors.3b8d2367.entry.js](http://localhost:8100/static/assets/vendors.3b8d2367.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/thumbnail.3acfb90e.entry.js](http://localhost:8100/static/assets/thumbnail.3acfb90e.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/vendors-node_modules_ctrl_tinycolor_dist_module_index_js-node_modules_ansi-html-community_ind-38a375.a43e0f0e.entry.js](http://localhost:8100/static/assets/vendors-node_modules_ctrl_tinycolor_dist_module_index_js-node_modules_ansi-html-community_ind-38a375.a43e0f0e.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/vendors-node_modules_react-icons_all-files_fa_FaAlignCenter_js-node_modules_react-icons_all-f-1e7b59.455a289f.entry.js](http://localhost:8100/static/assets/vendors-node_modules_react-icons_all-files_fa_FaAlignCenter_js-node_modules_react-icons_all-f-1e7b59.455a289f.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/vendors-node_modules_ace-builds_src-min-noconflict_mode-css_js-node_modules_ace-builds_src-mi-0e0816.9c24407f.entry.js](http://localhost:8100/static/assets/vendors-node_modules_ace-builds_src-min-noconflict_mode-css_js-node_modules_ace-builds_src-mi-0e0816.9c24407f.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/node_modules_moment_locale_sync_recursive_-packages_superset-ui-core_src_ui-overrides_Extensi-abeac2.b0cbab09.entry.js](http://localhost:8100/static/assets/node_modules_moment_locale_sync_recursive_-packages_superset-ui-core_src_ui-overrides_Extensi-abeac2.b0cbab09.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/src_setup_setupPlugins_ts.ad154aa8.entry.js](http://localhost:8100/static/assets/src_setup_setupPlugins_ts.ad154aa8.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
    <script src="[/static/assets/spa.be2574c0.entry.js](http://localhost:8100/static/assets/spa.be2574c0.entry.js)" async nonce="j-x0iNB7vJ8CoEGUuPFAOiYANuYcq8q1"></script>
  
  <!-- Bundle js spa END -->

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #24644 (659956d) into master (c53b249) will increase coverage by 0.10%.
The diff coverage is n/a.

❗ Current head 659956d differs from pull request most recent head a334af1. Consider uploading reports for the commit a334af1 to get more accurate results

@@            Coverage Diff             @@
##           master   #24644      +/-   ##
==========================================
+ Coverage   68.97%   69.08%   +0.10%     
==========================================
  Files        1907     1907              
  Lines       74153    74153              
  Branches     8182     8182              
==========================================
+ Hits        51148    51225      +77     
+ Misses      20882    20805      -77     
  Partials     2123     2123              
Flag Coverage Δ
hive 54.14% <ø> (?)
mysql 79.47% <ø> (?)
postgres 79.56% <ø> (ø)
presto 54.04% <ø> (ø)
python 83.54% <ø> (+0.21%) ⬆️
sqlite 78.12% <ø> (ø)
unit 54.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 8 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@dpgaspar dpgaspar merged commit b809815 into apache:master Jul 10, 2023
34 checks passed
@dpgaspar dpgaspar deleted the fix/nonce-eol-attr branch July 10, 2023 15:21
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 11, 2023
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants