Issues (4388)

Security Analysis    no vulnerabilities found

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

templates/Pages/home.php (33 issues)

1
<?php
0 ignored issues
show
Header blocks must be separated by a single blank line
Loading history...
2
/**
3
 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
0 ignored issues
show
The second line in the file doc comment must be "@file"
Loading history...
4
 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
0 ignored issues
show
Doc comment short description must be on a single line, further text should be a separate paragraph
Loading history...
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
Coding Style Documentation introduced by
Expected "xxxx-xxxx Squiz Pty Ltd (ABN 77 084 670 600)" for copyright declaration
Loading history...
The tag in position 1 should be the @package tag
Loading history...
@copyright tag must contain a year and the name of the copyright holder
Loading history...
11
 * @link      https://cakephp.org CakePHP(tm) Project
0 ignored issues
show
The tag in position 2 should be the @subpackage tag
Loading history...
The tag in position 2 should be the @license tag
Loading history...
Tag value indented incorrectly; expected 1 space but found 6
Loading history...
12
 * @since     0.10.0
0 ignored issues
show
The tag in position 3 should be the @author tag
Loading history...
The tag in position 3 should be the @link tag
Loading history...
Tag value indented incorrectly; expected 1 space but found 5
Loading history...
13
 * @license   https://opensource.org/licenses/mit-license.php MIT License
0 ignored issues
show
The tag in position 4 should be the @since tag
Loading history...
Tag value indented incorrectly; expected 1 space but found 3
Loading history...
The tag in position 4 should be the @copyright tag
Loading history...
14
 * @var \App\View\AppView $this
15
 */
0 ignored issues
show
PHP version not specified
Loading history...
There must be exactly one blank line after the file comment
Loading history...
Coding Style Documentation introduced by
Missing @package tag in file comment
Loading history...
Missing @category tag in file comment
Loading history...
Coding Style Documentation introduced by
Missing @subpackage tag in file comment
Loading history...
Coding Style Documentation introduced by
Missing @author tag in file comment
Loading history...
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
Expected 1 space(s) after NOT operator; 0 found
Loading history...
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
PHP files must only contain PHP code
Loading history...
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
Inline PHP statement must end with a semicolon
Loading history...
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
Inline PHP statement must end with a semicolon
Loading history...
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
Inline PHP statement must end with a semicolon
Loading history...
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
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
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
Expected 1 space(s) after NOT operator; 0 found
Loading history...
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
Inline PHP statement must end with a semicolon
Loading history...
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
Expected newline after closing brace
Loading history...
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
Inline PHP statement must end with a semicolon
Loading history...
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