-
-
Notifications
You must be signed in to change notification settings - Fork 404
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from partkeepr/PartKeepr-553
Fix for #553
- Loading branch information
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ app/config/parameters_setup.php | |
/composer.phar | ||
|
||
!.keep | ||
!app/logs/.htaccess | ||
!app/logs/ignore.json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Order deny,allow | ||
Deny from all |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Tests if the web server can handle pathInfo | ||
*/ | ||
Ext.define('PartKeeprSetup.WebserverLogDirectoryTest', { | ||
extend: 'PartKeeprSetup.AbstractTest', | ||
url: '../../app/logs/ignore.json', | ||
method: 'GET', | ||
name: "PHP", | ||
message: "app/logs access check", | ||
onSuccess: function (response) { | ||
var responseObj = Ext.decode(response.responseText); | ||
|
||
if (responseObj.message && responseObj.message === "readable") { | ||
this.success = false; | ||
this.resultMessage = "Web Server misconfiguration"; | ||
this.errors = ['Your <code>app/logs</code> directory is readable. Please either move your web server\'s document root to the web/ directory or configure <code>app/logs</code> to disallow access. For further information please read <a href="https://wiki.partkeepr.org/wiki/KB00007:Prevent_Access_to_the_logs_directory" target="_blank">wiki about how to prevent access to the logs directory</a>']; | ||
|
||
if (this.callback) { | ||
this.callback.appendTestResult(this); | ||
} | ||
|
||
if (this.success) { | ||
this.fireEvent("complete", this); | ||
} | ||
|
||
} | ||
}, | ||
onFailure: function () { | ||
this.success = true; | ||
this.resultMessage = "app/logs not readable"; | ||
|
||
if (this.callback) { | ||
this.callback.appendTestResult(this); | ||
} | ||
|
||
if (this.success) { | ||
this.fireEvent("complete", this); | ||
} | ||
|
||
|
||
} | ||
}); |