Skip to content

Commit

Permalink
sec(GIT) protect .git directory contents
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Mar 19, 2022
1 parent 7ed9b32 commit f9aafe7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build/HelperScripts/bettersafe.sh
Expand Up @@ -6,6 +6,8 @@ build/createLanguage.sh
build/HelperScripts
build/migrate6
build/migrate_from_vt6.php
build/migrate5
build/migrate_from_vt5.php
build/missingLanguage.sh
build/oo-merge
build/InstallRESTChanges.php
Expand All @@ -17,8 +19,7 @@ include/install/resources/utils.php
include/utils/DBHealthCheck.php
install
install.php
modules/Users/authTypes/adldap_test.php
modules/Migration"
modules/Users/authTypes/adldap_test.php"
for f in $FILES
do
if [ -e $f ]
Expand All @@ -28,6 +29,11 @@ do
fi
done
chmod 444 config.inc.php
if [ -e .git ]
then
echo "Protecting .git"
cp backup/.htaccess .git
fi
echo
echo "Deactivate all modules you are not using. Besides being more secure the application will be faster."
echo "Optionally you can"
Expand Down
2 changes: 2 additions & 0 deletions htaccess.txt
Expand Up @@ -10,3 +10,5 @@ Allow from all
Satisfy Any
</FilesMatch>

RedirectMatch 403 ^/.*/\.git/.*$
RedirectMatch 403 ^/\.git/.*$

0 comments on commit f9aafe7

Please sign in to comment.