giumar /
fortunecookies
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.
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | /** |
||
| 3 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
||
|
0 ignored issues
–
show
|
|||
| 4 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
||
|
0 ignored issues
–
show
|
|||
| 5 | * |
||
| 6 | * Licensed under The MIT License |
||
| 7 | * For full copyright and license information, please see the LICENSE.txt |
||
| 8 | * Redistributions of files must retain the above copyright notice. |
||
| 9 | * |
||
| 10 | * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
||
|
0 ignored issues
–
show
|
|||
| 11 | * @link https://cakephp.org CakePHP(tm) Project |
||
|
0 ignored issues
–
show
|
|||
| 12 | * @since 0.10.0 |
||
|
0 ignored issues
–
show
|
|||
| 13 | * @license https://opensource.org/licenses/mit-license.php MIT License |
||
|
0 ignored issues
–
show
|
|||
| 14 | * @var \App\View\AppView $this |
||
| 15 | */ |
||
|
0 ignored issues
–
show
|
|||
| 16 | use Cake\Cache\Cache; |
||
| 17 | use Cake\Core\Configure; |
||
| 18 | use Cake\Core\Plugin; |
||
| 19 | use Cake\Datasource\ConnectionManager; |
||
| 20 | use Cake\Error\Debugger; |
||
| 21 | use Cake\Http\Exception\NotFoundException; |
||
| 22 | |||
| 23 | $this->disableAutoLayout(); |
||
| 24 | |||
| 25 | if (!Configure::read('debug')) : |
||
|
0 ignored issues
–
show
|
|||
| 26 | throw new NotFoundException( |
||
| 27 | 'Please replace templates/Pages/home.php with your own version or re-enable debug mode.' |
||
| 28 | ); |
||
| 29 | endif; |
||
| 30 | |||
| 31 | $cakeDescription = 'CakePHP: the rapid development PHP framework'; |
||
| 32 | ?> |
||
| 33 | <!DOCTYPE html> |
||
|
0 ignored issues
–
show
|
|||
| 34 | <html> |
||
| 35 | <head> |
||
| 36 | <?= $this->Html->charset() ?> |
||
| 37 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
||
| 38 | <title> |
||
| 39 | <?= $cakeDescription ?>: |
||
| 40 | <?= $this->fetch('title') ?> |
||
| 41 | </title> |
||
| 42 | <?= $this->Html->meta('icon') ?> |
||
| 43 | |||
| 44 | <link href="https://fonts.googleapis.com/css?family=Raleway:400,700" rel="stylesheet"> |
||
| 45 | |||
| 46 | <?= $this->Html->css(['normalize.min', 'milligram.min', 'cake', 'home']) ?> |
||
| 47 | |||
| 48 | <?= $this->fetch('meta') ?> |
||
| 49 | <?= $this->fetch('css') ?> |
||
| 50 | <?= $this->fetch('script') ?> |
||
| 51 | </head> |
||
| 52 | <body> |
||
| 53 | <header> |
||
| 54 | <div class="container text-center"> |
||
| 55 | <a href="https://cakephp.org/" target="_blank" rel="noopener"> |
||
| 56 | <img alt="CakePHP" src="https://cakephp.org/v2/img/logos/CakePHP_Logo.svg" width="350" /> |
||
| 57 | </a> |
||
| 58 | <h1> |
||
| 59 | Welcome to CakePHP <?php echo Configure::version() ?> Strawberry (🍓) |
||
|
0 ignored issues
–
show
|
|||
| 60 | </h1> |
||
| 61 | </div> |
||
| 62 | </header> |
||
| 63 | <main class="main"> |
||
| 64 | <div class="container"> |
||
| 65 | <div class="content"> |
||
| 66 | <div class="row"> |
||
| 67 | <div class="column"> |
||
| 68 | <div class="message default text-center"> |
||
| 69 | <small>Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version.</small> |
||
| 70 | </div> |
||
| 71 | <!-- <div id="url-rewriting-warning" class="alert url-rewriting"> |
||
| 72 | <ul> |
||
| 73 | <li class="bullet problem"> |
||
| 74 | URL rewriting is not properly configured on your server.<br /> |
||
| 75 | 1) <a target="_blank" rel="noopener" href="https://book.cakephp.org/4/en/installation.html#url-rewriting">Help me configure it</a><br /> |
||
| 76 | 2) <a target="_blank" rel="noopener" href="https://book.cakephp.org/4/en/development/configuration.html#general-configuration">I don't / can't use URL rewriting</a> |
||
| 77 | </li> |
||
| 78 | </ul> |
||
| 79 | </div> --> |
||
| 80 | <?php Debugger::checkSecurityKeys(); ?> |
||
| 81 | </div> |
||
| 82 | </div> |
||
| 83 | <div class="row"> |
||
| 84 | <div class="column"> |
||
| 85 | <h4>Environment</h4> |
||
| 86 | <ul> |
||
| 87 | <?php if (version_compare(PHP_VERSION, '7.2.0', '>=')) : ?> |
||
| 88 | <li class="bullet success">Your version of PHP is 7.2.0 or higher (detected <?php echo PHP_VERSION ?>).</li> |
||
|
0 ignored issues
–
show
|
|||
| 89 | <?php else : ?> |
||
| 90 | <li class="bullet problem">Your version of PHP is too low. You need PHP 7.2.0 or higher to use CakePHP (detected <?php echo PHP_VERSION ?>).</li> |
||
|
0 ignored issues
–
show
|
|||
| 91 | <?php endif; ?> |
||
| 92 | |||
| 93 | <?php if (extension_loaded('mbstring')) : ?> |
||
| 94 | <li class="bullet success">Your version of PHP has the mbstring extension loaded.</li> |
||
| 95 | <?php else : ?> |
||
| 96 | <li class="bullet problem">Your version of PHP does NOT have the mbstring extension loaded.</li> |
||
| 97 | <?php endif; ?> |
||
| 98 | |||
| 99 | <?php if (extension_loaded('openssl')) : ?> |
||
| 100 | <li class="bullet success">Your version of PHP has the openssl extension loaded.</li> |
||
| 101 | <?php elseif (extension_loaded('mcrypt')) : ?> |
||
|
0 ignored issues
–
show
|
|||
| 102 | <li class="bullet success">Your version of PHP has the mcrypt extension loaded.</li> |
||
| 103 | <?php else : ?> |
||
| 104 | <li class="bullet problem">Your version of PHP does NOT have the openssl or mcrypt extension loaded.</li> |
||
| 105 | <?php endif; ?> |
||
| 106 | |||
| 107 | <?php if (extension_loaded('intl')) : ?> |
||
| 108 | <li class="bullet success">Your version of PHP has the intl extension loaded.</li> |
||
| 109 | <?php else : ?> |
||
| 110 | <li class="bullet problem">Your version of PHP does NOT have the intl extension loaded.</li> |
||
| 111 | <?php endif; ?> |
||
| 112 | </ul> |
||
| 113 | </div> |
||
| 114 | <div class="column"> |
||
| 115 | <h4>Filesystem</h4> |
||
| 116 | <ul> |
||
| 117 | <?php if (is_writable(TMP)) : ?> |
||
| 118 | <li class="bullet success">Your tmp directory is writable.</li> |
||
| 119 | <?php else : ?> |
||
| 120 | <li class="bullet problem">Your tmp directory is NOT writable.</li> |
||
| 121 | <?php endif; ?> |
||
| 122 | |||
| 123 | <?php if (is_writable(LOGS)) : ?> |
||
| 124 | <li class="bullet success">Your logs directory is writable.</li> |
||
| 125 | <?php else : ?> |
||
| 126 | <li class="bullet problem">Your logs directory is NOT writable.</li> |
||
| 127 | <?php endif; ?> |
||
| 128 | |||
| 129 | <?php $settings = Cache::getConfig('_cake_core_'); ?> |
||
| 130 | <?php if (!empty($settings)) : ?> |
||
|
0 ignored issues
–
show
|
|||
| 131 | <li class="bullet success">The <em><?php echo $settings['className'] ?>Engine</em> is being used for core caching. To change the config edit config/app.php</li> |
||
|
0 ignored issues
–
show
|
|||
| 132 | <?php else : ?> |
||
| 133 | <li class="bullet problem">Your cache is NOT working. Please check the settings in config/app.php</li> |
||
| 134 | <?php endif; ?> |
||
| 135 | </ul> |
||
| 136 | </div> |
||
| 137 | </div> |
||
| 138 | <hr> |
||
| 139 | <div class="row"> |
||
| 140 | <div class="column"> |
||
| 141 | <h4>Database</h4> |
||
| 142 | <?php |
||
| 143 | try { |
||
| 144 | $connection = ConnectionManager::get('default'); |
||
| 145 | $connected = $connection->connect(); |
||
|
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. Loading history...
|
|||
| 146 | } catch (Exception $connectionError) { |
||
|
0 ignored issues
–
show
|
|||
| 147 | $connected = false; |
||
| 148 | $errorMsg = $connectionError->getMessage(); |
||
|
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. Loading history...
|
|||
| 149 | if (method_exists($connectionError, 'getAttributes')) : |
||
| 150 | $attributes = $connectionError->getAttributes(); |
||
| 151 | if (isset($errorMsg['message'])) : |
||
| 152 | $errorMsg .= '<br />' . $attributes['message']; |
||
| 153 | endif; |
||
| 154 | endif; |
||
| 155 | } |
||
| 156 | ?> |
||
| 157 | <ul> |
||
| 158 | <?php if ($connected) : ?> |
||
| 159 | <li class="bullet success">CakePHP is able to connect to the database.</li> |
||
| 160 | <?php else : ?> |
||
| 161 | <li class="bullet problem">CakePHP is NOT able to connect to the database.<br /><?php echo $errorMsg ?></li> |
||
|
0 ignored issues
–
show
|
|||
| 162 | <?php endif; ?> |
||
| 163 | </ul> |
||
| 164 | </div> |
||
| 165 | <div class="column"> |
||
| 166 | <h4>DebugKit</h4> |
||
| 167 | <ul> |
||
| 168 | <?php if (Plugin::isLoaded('DebugKit')) : ?> |
||
| 169 | <li class="bullet success">DebugKit is loaded.</li> |
||
| 170 | <?php else : ?> |
||
| 171 | <li class="bullet problem">DebugKit is NOT loaded. You need to either install pdo_sqlite, or define the "debug_kit" connection name.</li> |
||
| 172 | <?php endif; ?> |
||
| 173 | </ul> |
||
| 174 | </div> |
||
| 175 | </div> |
||
| 176 | <hr> |
||
| 177 | <div class="row"> |
||
| 178 | <div class="column links"> |
||
| 179 | <h3>Getting Started</h3> |
||
| 180 | <a target="_blank" rel="noopener" href="https://book.cakephp.org/4/en/">CakePHP Documentation</a> |
||
| 181 | <a target="_blank" rel="noopener" href="https://book.cakephp.org/4/en/tutorials-and-examples/cms/installation.html">The 20 min CMS Tutorial</a> |
||
| 182 | </div> |
||
| 183 | </div> |
||
| 184 | <hr> |
||
| 185 | <div class="row"> |
||
| 186 | <div class="column links"> |
||
| 187 | <h3>Help and Bug Reports</h3> |
||
| 188 | <a target="_blank" rel="noopener" href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a> |
||
| 189 | <a target="_blank" rel="noopener" href="http://cakesf.herokuapp.com/">Slack</a> |
||
| 190 | <a target="_blank" rel="noopener" href="https://github.com/cakephp/cakephp/issues">CakePHP Issues</a> |
||
| 191 | <a target="_blank" rel="noopener" href="http://discourse.cakephp.org/">CakePHP Forum</a> |
||
| 192 | </div> |
||
| 193 | </div> |
||
| 194 | <hr> |
||
| 195 | <div class="row"> |
||
| 196 | <div class="column links"> |
||
| 197 | <h3>Docs and Downloads</h3> |
||
| 198 | <a target="_blank" rel="noopener" href="https://api.cakephp.org/">CakePHP API</a> |
||
| 199 | <a target="_blank" rel="noopener" href="https://bakery.cakephp.org">The Bakery</a> |
||
| 200 | <a target="_blank" rel="noopener" href="https://book.cakephp.org/4/en/">CakePHP Documentation</a> |
||
| 201 | <a target="_blank" rel="noopener" href="https://plugins.cakephp.org">CakePHP plugins repo</a> |
||
| 202 | <a target="_blank" rel="noopener" href="https://github.com/cakephp/">CakePHP Code</a> |
||
| 203 | <a target="_blank" rel="noopener" href="https://github.com/FriendsOfCake/awesome-cakephp">CakePHP Awesome List</a> |
||
| 204 | <a target="_blank" rel="noopener" href="https://www.cakephp.org">CakePHP</a> |
||
| 205 | </div> |
||
| 206 | </div> |
||
| 207 | <hr> |
||
| 208 | <div class="row"> |
||
| 209 | <div class="column links"> |
||
| 210 | <h3>Training and Certification</h3> |
||
| 211 | <a target="_blank" rel="noopener" href="https://cakefoundation.org/">Cake Software Foundation</a> |
||
| 212 | <a target="_blank" rel="noopener" href="https://training.cakephp.org/">CakePHP Training</a> |
||
| 213 | </div> |
||
| 214 | </div> |
||
| 215 | </div> |
||
| 216 | </div> |
||
| 217 | </main> |
||
| 218 | </body> |
||
| 219 | </html> |
||
| 220 |