Skip to content

Commit

Permalink
security(ssr-helpers): do not leak currentScript when on SSR with Pin…
Browse files Browse the repository at this point in the history
…ia/Vuex
  • Loading branch information
rstoenescu committed Jan 13, 2023
1 parent 011320c commit 4a9eed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/ssr-helpers/create-renderer.js
Expand Up @@ -107,7 +107,7 @@ function renderStyles (renderContext, usedAsyncFiles, ssrContext) {
)
}

const autoRemove = 'var currentScript=document.currentScript;currentScript.parentNode.removeChild(currentScript)'
const autoRemove = 'document.currentScript.remove()'

function renderVuexState (ssrContext, nonce) {
const state = serialize(ssrContext.state, { isJSON: true })
Expand Down
4 changes: 2 additions & 2 deletions utils/ssr-helpers/package.json
@@ -1,6 +1,6 @@
{
"name": "@quasar/ssr-helpers",
"version": "2.2.0",
"version": "2.2.1",
"description": "Quasar Framework helper package for SSR",
"author": {
"name": "Razvan Stoenescu",
Expand All @@ -25,6 +25,6 @@
"access": "public"
},
"dependencies": {
"serialize-javascript": "^5.0.1"
"serialize-javascript": "^6.0.0"
}
}

0 comments on commit 4a9eed0

Please sign in to comment.