Ver Fonte

server.js: removed redundant call to path.normalize()

Mr.doob há 4 dias atrás
pai
commit
7cc18054c7
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      utils/server.js

+ 1 - 1
utils/server.js

@@ -47,7 +47,7 @@ function createHandler( rootDirectory ) {
 	return ( req, res ) => {
 
 		const pathname = decodeURIComponent( req.url.split( '?' )[ 0 ] );
-		let filePath = path.normalize( path.join( rootDirectory, pathname ) );
+		let filePath = path.join( rootDirectory, pathname );
 
 		// Prevent path traversal attacks
 		if ( ! filePath.startsWith( rootDirectory ) ) {

粤ICP备19079148号