🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:ValidatePathEncoding.php
<?php namespace Illuminate\Http\Middleware; use Closure; use Illuminate\Http\Exceptions\MalformedUrlException; use Illuminate\Http\Request; class ValidatePathEncoding { /** * Validate that the incoming request has a valid UTF-8 encoded path. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return \Symfony\Component\HttpFoundation\Response * * @throws \Illuminate\Http\Exceptions\MalformedUrlException */ public function handle(Request $request, Closure $next) { $decodedPath = rawurldecode($request->path()); if (! mb_check_encoding($decodedPath, 'UTF-8')) { throw new MalformedUrlException; } return $next($request); } }
Save Changes
Cancel
Create New File
Create New Folder