Unfortunately I must use Typo3 at work, I know stupid idea, and they store the whole application in the web servers document root, so everything ...
For further actions, you may consider blocking this person and/or reporting abuse
Well, then you configured it to do so.
The application is stored in public, but has
htaccess
rules to prevent any access to them. It is possible to do some access protection checks within the “Install Tool“, which may also re-generate some of those htaccess files for you, in case they are missing.The
vendor
folder and.env
file are supposed to be saved outside of the document root. TYPO3 encourages this and gives a pretty clear example on how accomplish this using Composer. See composer.typo3.org/ (“extra“ section in thecomposer.json
example file).In cases when you have a webpackage without access above document root, then you might need to store these files in the document root. Same conditions apply to all other PHP frameworks, like Symfony etc. However, even then TYPO3 denies any access to these files, using
htaccess
rules yet again. Seegithub.com/TYPO3/TYPO3.CMS/blob/ma... (line 292, deny access to dot files).
It is true, that a
.env
file in a public folder with public access would be a very large security risk. So please don't do this. Instead move it outside of the public folder or use other security measurements provided by TYPO3 instead.Argumentum ad ignorantiam.
If supported, I would use something like an htaccess file to protect that file
So you're essentially blaming TYPO3 for a mistake your team made when setting up the project or did you just skip reading the README (github.com/helhum/dotenv-connector...) file?
How nice of you.
I think just securing your file isn't enough, what I would do is store env in aws or other key management platforma and then allow that server only to access those keys.
I explained this a bit in here medium.com/@abidul.rmdn/move-env-k... .
This is so incredibly obvious that anyone making this mistake shouldn't be in a position where he's able to do so.