This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
||
3 | |||
4 | /** |
||
5 | * This is the main configuration file for CiiMS. Options for CiiMS extend from this base |
||
6 | * configuration file, and should be written to protected/config/main.php. They will override _any_ |
||
7 | * configuration variable listed in here via CMap::mergeArray() |
||
8 | * |
||
9 | * The reason for doing this is to reduce the number of options written directly to the main.php file, |
||
10 | * so that we're only writing out what is _needed_ in that config file. Additionally, if we want to |
||
11 | * introduce new functionality in the future, we can safely add it to this config file without having |
||
12 | * to make sure the end user adds it to their config file. The point is to make the main.php config file |
||
13 | * a write once file so the end user never has to deal with it after the install. |
||
14 | * |
||
15 | * @package CiiMS Content Management System |
||
16 | * @author Charles R. Portwood II <[email protected]> |
||
17 | * @copyright Charles R. Portwood II <https://www.erianna.com> 2012-2014 |
||
18 | * @license http://opensource.org/licenses/MIT MIT LICENSE |
||
19 | * @link https://github.com/charlesportwoodii/CiiMS |
||
20 | */ |
||
21 | $import = function($default=false) { |
||
22 | |||
23 | $modules = (require __DIR__ . DS . 'modules.php'); |
||
24 | |||
25 | if ($default === true) |
||
26 | return $modules; |
||
27 | |||
28 | $m = array( |
||
29 | 'application.models.*', |
||
30 | 'application.models.forms.*', |
||
31 | 'application.models.settings.*' |
||
32 | ); |
||
33 | |||
34 | foreach ($modules as $k=>$v) { |
||
35 | $m[] = 'application.modules.'.$v.'.*'; |
||
36 | } |
||
37 | |||
38 | return $m; |
||
39 | }; |
||
40 | |||
41 | $ciimsCoreConfig = array( |
||
42 | 'basePath' => __DIR__.DS.'..', |
||
43 | 'name' => NULL, |
||
44 | 'sourceLanguage' => 'en_US', |
||
45 | 'preload' => array( |
||
46 | 'cii', |
||
47 | 'analytics' |
||
48 | ), |
||
49 | 'import' => $import(), |
||
50 | 'modules' => $import(true), |
||
51 | 'behaviors' => array( |
||
52 | 'onBeginRequest' => array( |
||
53 | 'class' => 'vendor.charlesportwoodii.yii-newrelic.behaviors.YiiNewRelicWebAppBehavior', |
||
54 | ), |
||
55 | ), |
||
56 | 'components' => array( |
||
57 | 'themeManager' => array( |
||
58 | 'basePath' => (__DIR__ . DS . '..' . DS . '..' . DS . 'themes') |
||
59 | ), |
||
60 | 'messages' => array( |
||
61 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiPHPMessageSource' |
||
62 | ), |
||
63 | 'newRelic' => array( |
||
64 | 'class' => 'vendor.charlesportwoodii.yii-newrelic.YiiNewRelic', |
||
65 | 'setAppNameToYiiName' => false |
||
66 | ), |
||
67 | 'cii' => array( |
||
68 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiBase' |
||
69 | ), |
||
70 | 'analytics' => array( |
||
71 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiAnalytics', |
||
72 | 'lowerBounceRate' => true, |
||
73 | 'options' => array(), |
||
74 | ), |
||
75 | 'assetManager' => array( |
||
76 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiAssetManager', |
||
77 | ), |
||
78 | 'clientScript' => array( |
||
79 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiClientScript', |
||
80 | ), |
||
81 | 'errorHandler' => array( |
||
82 | 'errorAction' => 'site/error', |
||
83 | ), |
||
84 | 'session' => array( |
||
85 | 'autoStart' => true, |
||
86 | 'sessionName' => '_ciims', |
||
87 | 'cookieMode' => 'only', |
||
88 | 'cookieParams' => array( |
||
89 | 'httponly' => true, |
||
90 | 'secure' => ( |
||
91 | (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || |
||
92 | (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) || |
||
93 | (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') |
||
94 | ) |
||
95 | ) |
||
96 | ), |
||
97 | 'urlManager' => array( |
||
98 | 'class' => 'vendor.charlesportwoodii.cii.components.CiiURLManager', |
||
99 | 'urlFormat' => 'path', |
||
100 | 'showScriptName' => false |
||
101 | ), |
||
102 | 'user' => array( |
||
103 | 'authTimeout' => 900, |
||
104 | 'absoluteAuthTimeout' => 1900, |
||
105 | 'autoRenewCookie' => true |
||
106 | ), |
||
107 | 'db' => array( |
||
108 | 'class' => 'CDbConnection', |
||
109 | 'connectionString' => NULL, |
||
110 | 'emulatePrepare' => true, |
||
111 | 'username' => NULL, |
||
112 | 'password' => NULL, |
||
113 | 'charset' => 'utf8', |
||
114 | 'schemaCachingDuration' => 3600, |
||
115 | 'enableProfiling' => false, |
||
116 | 'enableParamLogging' => false |
||
117 | ), |
||
118 | 'log' => array( |
||
119 | 'class' => 'CLogRouter', |
||
120 | 'routes' => array( |
||
121 | array( |
||
122 | 'class'=>'CFileLogRoute', |
||
123 | 'levels'=>'error, warning', |
||
124 | ) |
||
125 | ) |
||
126 | ), |
||
127 | 'cache' => array( |
||
128 | 'class' => 'CFileCache', |
||
129 | ) |
||
130 | ), |
||
131 | 'params' => array( |
||
132 | 'encryptionKey' => NULL, |
||
133 | 'debug' => false, |
||
134 | 'trace' => 0, |
||
135 | 'NewRelicAppName' => null, |
||
136 | 'max_fileupload_size' => (10 * 1024 * 1024), |
||
137 | 'cards' => 'https://cards.ciims.io/1.0.0', |
||
138 | ) |
||
139 | ); |
||
140 | |||
141 | // CLI specific data |
||
142 | if (php_sapi_name() == "cli") |
||
0 ignored issues
–
show
|
|||
143 | { |
||
144 | $ciimsCoreConfig['behaviors'] = array( |
||
145 | 'onBeginRequest' => array( |
||
146 | 'class' => 'vendor.charlesportwoodii.yii-newrelic.behaviors.YiiNewRelicConsoleAppBehavior', |
||
147 | ), |
||
148 | 'onEndRequest' => array( |
||
149 | 'class' => 'vendor.charlesportwoodii.yii-newrelic.behaviors.YiiNewRelicConsoleAppBehavior', |
||
150 | ) |
||
151 | ); |
||
152 | } |
||
153 | |||
154 | if (php_sapi_name() != "cli" && YII_DEBUG) |
||
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
cli does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. ![]() |
|||
155 | { |
||
156 | $ciimsCoreConfig['preload'][] = 'debug'; |
||
157 | $ciimsCoreConfig['components']['debug'] = array( |
||
158 | 'class' => 'vendor.zhuravljov.yii2-debug.Yii2Debug', |
||
159 | 'enabled' => YII_DEBUG, |
||
160 | 'allowedIPs' => array('*') |
||
161 | ); |
||
162 | } |
||
163 | |||
164 | return $ciimsCoreConfig; |
||
165 |
PHP provides two ways to mark string literals. Either with single quotes
'literal'
or with double quotes"literal"
. The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (
\'
) and the backslash (\\
). Every other character is displayed as is.Double quoted string literals may contain other variables or more complex escape sequences.
will print an indented:
Single is Value
If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.
For more information on PHP string literals and available escape sequences see the PHP core documentation.