-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aaron Carlino
committed
Nov 2, 2020
1 parent
0b4f59a
commit 22b1186
Showing
7,588 changed files
with
949,499 additions
and
6 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
### SILVERSTRIPE START ### | ||
|
||
# Deny access to templates (but allow from localhost) | ||
<Files *.ss> | ||
Require ip 127.0.0.1 | ||
</Files> | ||
|
||
# Deny access to IIS configuration | ||
<Files web.config> | ||
Require all denied | ||
</Files> | ||
|
||
# Deny access to YAML configuration files which might include sensitive information | ||
<Files ~ "\.ya?ml$"> | ||
Require all denied | ||
</Files> | ||
|
||
# Route errors to static pages automatically generated by SilverStripe | ||
ErrorDocument 404 /assets/error-404.html | ||
ErrorDocument 500 /assets/error-500.html | ||
|
||
<IfModule mod_rewrite.c> | ||
|
||
# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4 | ||
<IfModule mod_dir.c> | ||
DirectoryIndex disabled | ||
DirectorySlash On | ||
</IfModule> | ||
|
||
SetEnv HTTP_MOD_REWRITE On | ||
RewriteEngine On | ||
|
||
# Enable HTTP Basic authentication workaround for PHP running in CGI mode | ||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
|
||
# Deny access to potentially sensitive files and folders | ||
RewriteRule ^vendor(/|$) - [F,L,NC] | ||
RewriteRule ^\.env - [F,L,NC] | ||
RewriteRule silverstripe-cache(/|$) - [F,L,NC] | ||
RewriteRule composer\.(json|lock) - [F,L,NC] | ||
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC] | ||
|
||
# Process through SilverStripe if no file with the requested name exists. | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule .* index.php | ||
</IfModule> | ||
### SILVERSTRIPE END ### |
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,3 @@ | ||
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$"> | ||
Require all denied | ||
</FilesMatch> |
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,9 @@ | ||
<?php | ||
|
||
use SilverStripe\Security\PasswordValidator; | ||
use SilverStripe\Security\Member; | ||
|
||
// remove PasswordValidator for SilverStripe 5.0 | ||
$validator = PasswordValidator::create(); | ||
// Settings are registered via Injector configuration - see passwords.yml in framework | ||
Member::set_password_validator($validator); |
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,8 @@ | ||
--- | ||
Name: myproject-database | ||
--- | ||
SilverStripe\ORM\Connect\MySQLDatabase: | ||
connection_charset: utf8mb4 | ||
connection_collation: utf8mb4_unicode_ci | ||
charset: utf8mb4 | ||
collation: utf8mb4_unicode_ci |
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,9 @@ | ||
--- | ||
Name: app-mimeuploadvalidator | ||
After: '#mimeuploadvalidator' | ||
Only: | ||
moduleexists: 'silverstripe/mimevalidator' | ||
--- | ||
SilverStripe\Core\Injector\Injector: | ||
SilverStripe\Assets\Upload_Validator: | ||
class: SilverStripe\MimeValidator\MimeUploadValidator |
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,5 @@ | ||
--- | ||
Name: myproject | ||
--- | ||
SilverStripe\Core\Manifest\ModuleManifest: | ||
project: app |
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,13 @@ | ||
<?php | ||
|
||
namespace { | ||
|
||
use SilverStripe\CMS\Model\SiteTree; | ||
|
||
class Page extends SiteTree | ||
{ | ||
private static $db = []; | ||
|
||
private static $has_one = []; | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
namespace { | ||
|
||
use SilverStripe\CMS\Controllers\ContentController; | ||
|
||
class PageController extends ContentController | ||
{ | ||
/** | ||
* An array of actions that can be accessed via a request. Each array element should be an action name, and the | ||
* permissions or conditions required to allow the user to access it. | ||
* | ||
* <code> | ||
* [ | ||
* 'action', // anyone can access this action | ||
* 'action' => true, // same as above | ||
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action | ||
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true | ||
* ]; | ||
* </code> | ||
* | ||
* @var array | ||
*/ | ||
private static $allowed_actions = []; | ||
|
||
protected function init() | ||
{ | ||
parent::init(); | ||
// You can include any CSS or JS required by your project here. | ||
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/ | ||
} | ||
} | ||
} |
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,35 @@ | ||
# | ||
# Whitelist appropriate assets files. | ||
# This file is automatically generated via File.allowed_extensions configuration | ||
# See AssetAdapter::renderTemplate() for reference. | ||
# | ||
|
||
# We disable PHP via several methods | ||
# Replace the handler with the default plaintext handler | ||
AddHandler default-handler php phtml php3 php4 php5 inc | ||
|
||
<IfModule mod_php5.c> | ||
# Turn the PHP engine off | ||
php_flag engine off | ||
</IfModule> | ||
|
||
<IfModule mod_rewrite.c> | ||
<IfModule mod_env.c> | ||
SetEnv HTTP_MOD_REWRITE On | ||
</IfModule> | ||
|
||
RewriteEngine On | ||
|
||
# Allow error pages | ||
RewriteCond %{REQUEST_FILENAME} -f | ||
RewriteRule error[^\\/]*\.html$ - [L] | ||
|
||
# Allow specific file extensions | ||
RewriteCond %{REQUEST_URI} !^[^.]*[^\/]*\.(?i:css|js|ace|arc|arj|asf|au|avi|bmp|bz2|cab|cda|csv|dmg|doc|docx|dotx|flv|gif|gpx|gz|hqx|ico|jpeg|jpg|kml|m4a|m4v|mid|midi|mkv|mov|mp3|mp4|mpa|mpeg|mpg|ogg|ogv|pages|pcx|pdf|png|pps|ppt|pptx|potx|ra|ram|rm|rtf|sit|sitx|tar|tgz|tif|tiff|txt|wav|webm|wma|wmv|xls|xlsx|xltx|zip|zipx|graphql)$ | ||
RewriteRule .* - [F] | ||
|
||
# Non existant files passed to requesthandler | ||
RewriteCond %{REQUEST_URI} ^(.*)$ | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule .* ../index.php [QSA] | ||
</IfModule> |
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 @@ | ||
Require all denied | ||
RewriteRule .* - [F] |
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,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<base href="http://versioned.test/"><!--[if lte IE 6]></base><![endif]--> | ||
|
||
<title>Page not found</title> | ||
<meta name="generator" content="SilverStripe - https://www.silverstripe.org" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="/resources/silverstripe/framework/client/styles/debug.css?m=1604189410" /> | ||
</head> | ||
<body> | ||
<div class="info"> | ||
<h1>Page not found</h1> | ||
</div> | ||
|
||
<div class="options"> | ||
|
||
<p>Sorry, it seems you were trying to access a page that doesn't exist.</p><p>Please check the spelling of the URL you were trying to access and try again.</p> | ||
|
||
|
||
</div> | ||
</body> | ||
</html> |
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,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<base href="http://versioned.test/"><!--[if lte IE 6]></base><![endif]--> | ||
|
||
<title>Server error</title> | ||
<meta name="generator" content="SilverStripe - https://www.silverstripe.org" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="/resources/silverstripe/framework/client/styles/debug.css?m=1604189410" /> | ||
</head> | ||
<body> | ||
<div class="info"> | ||
<h1>Server error</h1> | ||
</div> | ||
|
||
<div class="options"> | ||
|
||
<p>Sorry, there was a problem with handling your request.</p> | ||
|
||
|
||
</div> | ||
</body> | ||
</html> |
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
Oops, something went wrong.