xperseguers / t3ext-fal-protect

This extension protects everything within fileadmin/ based on associated file restrictions.
https://extensions.typo3.org/extension/fal_protect
GNU General Public License v2.0
11 stars 7 forks source link

Use only the path for file selection #36

Closed lochmueller closed 2 years ago

lochmueller commented 2 years ago

Hey everone,

currently the middleware select the target path via $target = $request->getRequestTarget(). This is not usefull in case of query parameter, that are not part of the real filename. I am using the middleware patch https://github.com/xperseguers/t3ext-fal-protect/pull/35 and want to view a file with myfile.txt but want to trigger the download (via a second middlware) via myfile.txt?download=1. The problem is, that the fal_protect extension do not find the file anymore, if there are quer parameter.

I suggest to select the target via $target = $request->getUri()->getPath()to solve this problem. Should I provide a pull request?

Regards, Tim

lochmueller commented 2 years ago

Nice. Thanks.