-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The middleware is processed for files too #5
Comments
Is this issue also about fileadmin file handling? If so, then it doesn't seem to be a problem anymore for fileadmin file handling: I just tested ExampleThree files in fileadmin, all in the same directory: File
|
By default TYPO3 bypasses the fileadmin folder but i have a middleware that initiates the fileadmin folder through php, and therefor activates your middleware. My middleware then validates if the user is logged in and has access based on uri; but due to your middleware this request is manipulated (newly created) for my usecase and therefor not used correctly anymore. As i adjusted it locally, it doesn't conflict anymore. Feel free to adjust or just leave it be but the problem remains. If you want my 'secured files' extension to test, i can send you this in private (feel free to dm me in slack) |
The redirect middleware is affected. If you want to use redirects for files with uppercase letters in the filepath, it won't work as the request is already turned to lowercase. Workaround at the moment is to change the order of middlewares. I'm not shure if there are any drawbacks, though. |
Maybe its something not for this; but I had to manually do this in my own environment and wanted to mention it here:
I have a middleware handling 'secured' files to find the files and serve the file to the browser. As this is processed through middleware the justincase extension lowercased the filepath too; resolving into unknown files.
I fixed this with the following code before the lowerstring check is executed:
Do you think this should be added for possible other conflicts too?
The text was updated successfully, but these errors were encountered: