Unverified Commit 414033de authored by NGPixel's avatar NGPixel

fix: asset path traversal on windows

parent 112d0707
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment