PHP Warning: Undefined array key 1 in \Leuchtfeuer\SecureDownloads\Middleware\FileDeliveryMiddleware
#217
Labels
\Leuchtfeuer\SecureDownloads\Middleware\FileDeliveryMiddleware
#217
Describe the bug
If the URLs are not composed correctly, a PHP warning may occur. The URLs were generated by a security scan.
PHP Warning: Undefined array key 1 in /var/www/html/vendor/leuchtfeuer/secure-downloads/Classes/Middleware/FileDeliveryMiddleware.php line 54
Line 54: [$jwt, $basePath] = explode('/', $cleanPath);
We fixed this by only using
$jwt
(key 0) due to$basePath
not being used in the code.To Reproduce
Steps to reproduce the behavior:
\Leuchtfeuer\SecureDownloads\Middleware\FileDeliveryMiddleware->assetPrefix
to "/securedl/sdl-"GET /securedl/sdl-eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MzAzMDI5NDQsImV4cCI6MTczMjk4NDk0NCwidXNlciI6MCwiZ3JvdXBzIjpbMCwtMV0sImZpbGUiOiJ0eXBvM3RlbXAvYXNzZXRzL19wcm9jZXNzZWRfL2MvNy9jc21fVE9QLTIwMjJfNjJiMzhkMTkwYi5wbmciLCJwYWdlIjo5MDZ9.mAKvqPEVwcb00uofSE8vN2pOJpC6_ijfHasYWlFe7Gw
Expected behavior
Statuscode 404
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: