mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
fix: escape quotes in page file names
This commit seeks to fix a possible security issue described in #2991.
This commit is contained in:
parent
6b3f7ffc43
commit
ce9bb082aa
@ -314,7 +314,7 @@ module.exports = class Builder {
|
||||
})).forEach(f => {
|
||||
const key = f.replace(/\.(js|vue)$/, '')
|
||||
if (/\.vue$/.test(f) || !files[key]) {
|
||||
files[key] = f
|
||||
files[key] = f.replace(/(['|"])/g, '\\$1')
|
||||
}
|
||||
})
|
||||
templateVars.router.routes = createRoutes(
|
||||
|
Loading…
Reference in New Issue
Block a user