Block web access to .env and add note about Lokalise API key#1922
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1922 +/- ##
============================================
- Coverage 71.03% 70.08% -0.95%
+ Complexity 1694 1670 -24
============================================
Files 34 34
Lines 4502 4393 -109
============================================
- Hits 3198 3079 -119
- Misses 1304 1314 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
miguelvaara
approved these changes
Feb 4, 2026
Contributor
miguelvaara
left a comment
There was a problem hiding this comment.
Works as intended and well done in every way. Can be merged! Thanks! :-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Reasons for creating this PR
We have received reports that the Lokalise API key in .env has leaked. However, the key is read-only and intended to be public, as documented in Translation in the wiki. This PR adds a note to the .env file stating that the key is public. In addition, this PR makes Skosmos installations more secure by preventing Apache web access to files like .git and .env, which could potentially contain secrets (even though the default key in .env is not a secret).
How to test: try accessing http://localhost/Skosmos/.env (or similar URL), it should now give a 403 Forbidden error.
Link to relevant issue(s), if any
none
Description of the changes in this PR
Known problems or uncertainties in this PR
none
Checklist
.sr-onlyclass, color contrast)