Skip to content

fix: webview cspSource#2120

Merged
erha19 merged 2 commits intomainfrom
fix/webview-csp-source
Dec 27, 2022
Merged

fix: webview cspSource#2120
erha19 merged 2 commits intomainfrom
fix/webview-csp-source

Conversation

@Aaaaash
Copy link
Copy Markdown
Member

@Aaaaash Aaaaash commented Dec 26, 2022

Types

  • 🐛 Bug Fixes

Background or solution

部分插件在加载 webview 资源时会指定 style-src 属性,基于 webview 的 cspSource 计算得出,但默认没有加入当前插件的路径,导致在 electron 端会因为 csp 错误加载失败

image

image

因插件 webview 中资源都会被转换为 vscode-resource 协议,所以需要将 vscode-resource 协议下的插件路径加入到 style-src 中

image

Changelog

  • fix webview cspSrouce value

@github-actions github-actions Bot added the 🐞 bug Something isn't working label Dec 26, 2022
@Aaaaash
Copy link
Copy Markdown
Member Author

Aaaaash commented Dec 26, 2022

/publish

@github-actions
Copy link
Copy Markdown
Contributor

🎉 PR Next version 2.21.11-next-1672040246.0 publish successful! You can install prerelease version via npm install package@2.21.11-next-1672040246.0 @Aaaaash

2.21.11-next-1672040246.0

/home/runner/work/_temp/_runner_file_commands/step_summary_dec13eeb-0d1e-4adf-8d11-b0a9c1e0b42f

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 26, 2022

Codecov Report

Base: 57.76% // Head: 57.75% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (f3c5e58) compared to base (4703237).
Patch coverage: 42.85% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2120      +/-   ##
==========================================
- Coverage   57.76%   57.75%   -0.01%     
==========================================
  Files        1299     1299              
  Lines       81630    81634       +4     
  Branches    17017    17018       +1     
==========================================
- Hits        47152    47149       -3     
- Misses      31346    31351       +5     
- Partials     3132     3134       +2     
Flag Coverage Δ
jsdom 52.58% <42.85%> (-0.01%) ⬇️
node 16.81% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../src/hosted/api/vscode/ext.host.window.api.impl.ts 12.40% <ø> (ø)
...sion/src/hosted/api/vscode/ext.host.api.webview.ts 69.89% <42.85%> (-0.61%) ⬇️
packages/monaco/src/browser/schema-registry.ts 68.88% <0.00%> (-2.23%) ⬇️
...kages/theme/src/browser/workbench.theme.service.ts 71.38% <0.00%> (-0.58%) ⬇️
...erences/src/browser/preference-settings.service.ts 76.41% <0.00%> (-0.44%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@erha19 erha19 merged commit 86944b8 into main Dec 27, 2022
@erha19 erha19 deleted the fix/webview-csp-source branch December 27, 2022 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants