Prevents Apache from serving CLI scripts
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 7 Sep 2020 09:43:20 +0000 (05:43 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 7 Sep 2020 09:43:20 +0000 (05:43 -0400)
.gitignore
.htaccess-dist
bin/.htaccess [new file with mode: 0644]

index 2d8acf0..3250fb0 100644 (file)
@@ -71,8 +71,8 @@ venv/
 /addons
 /addon
 
-#ignore .htaccess
-.htaccess
+#ignore base .htaccess
+/.htaccess
 
 #ignore filesystem storage default path
 /storage
index a671cc6..3c90982 100644 (file)
@@ -1,3 +1,6 @@
+# This file is meant to be copied to ".htaccess" on Apache-powered web servers.
+# The created .htaccess file can be edited manually and will not be overwritten by Friendica updates.
+
 Options -Indexes
 AddType application/x-java-archive .jar
 AddType audio/ogg .oga
diff --git a/bin/.htaccess b/bin/.htaccess
new file mode 100644 (file)
index 0000000..716a932
--- /dev/null
@@ -0,0 +1,10 @@
+# This file prevents browser access to Friendica command-line scripts on Apache-powered web servers.
+# It isn't meant to be edited manually, please check the base Friendica folder for the .htaccess-dist file instead.
+
+<IfModule authz_host_module>
+    Require all denied
+</IfModule>
+<IfModule !authz_host_module>
+    Order Allow,Deny
+    Deny from all
+</IfModule>