Explorar el Código

fix: prevent upload bypass via uppercase path

Nicolas Giard hace 3 años
padre
commit
7b14b39de0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      server/helpers/security.js

+ 1 - 1
server/helpers/security.js

@@ -32,7 +32,7 @@ module.exports = {
         token = req.cookies['jwt']
       }
       // Force uploads to use Auth headers
-      if (req.path === '/u') {
+      if (req.path.toLowerCase() === '/u') {
         return null
       }
       return token