fix: asset path traversal on windows
This commit is contained in:
parent
112d070730
commit
414033de9d
@ -35,6 +35,8 @@ module.exports = {
|
||||
rawPath = rawPath.replace(unsafeCharsRegex, '')
|
||||
if (rawPath === '') { rawPath = 'home' }
|
||||
|
||||
rawPath = rawPath.replaceAll('\\', '').replaceAll('//', '').replaceAll(/\.\.+/ig, '')
|
||||
|
||||
// Extract Info
|
||||
let pathParts = _.filter(_.split(rawPath, '/'), p => {
|
||||
p = _.trim(p)
|
||||
|
Loading…
Reference in New Issue
Block a user