Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix the way htaccess are structured inside data folder: make data for…
Browse files Browse the repository at this point in the history
…bidden by default, and allow data/public/ only, instead of forbidding all the others one by one. Close #635
  • Loading branch information
cdujeu committed Sep 15, 2014
1 parent 6fefa80 commit ca6666b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/src/data/.htaccess
@@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all
3 changes: 2 additions & 1 deletion core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -925,7 +925,8 @@ public function initPublicFolder($downloadFolder)
@copy($pDir."/res/button_cancel.png", $downloadFolder."/button_cancel.png");
@copy(AJXP_INSTALL_PATH."/server/index.html", $downloadFolder."/index.html");
$dlUrl = $this->buildPublicDlURL();
$htaccessContent = "ErrorDocument 404 ".$dlUrl."/404.html\n<Files \".ajxp_*\">\ndeny from all\n</Files>\n";
$htaccessContent = "Order Deny,Allow\nAllow from all\n";
$htaccessContent .= "\n<Files \".ajxp_*\">\ndeny from all\n</Files>\n";
$path = parse_url($dlUrl, PHP_URL_PATH);
$htaccessContent .= '
<IfModule mod_rewrite.c>
Expand Down

0 comments on commit ca6666b

Please sign in to comment.