Issues (632)

Security Analysis    not enabled

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.

Updates/update_cms_310-2017-07-29-11-00-00.php (3 issues)

1
<?php
2
3
use Ffcms\Core\Migrations\MigrationInterface;
4
use Ffcms\Core\Migrations\Migration;
5
6
/**
7
 * Class update_cms_310
8
 */
9
class update_cms_310 extends Migration implements MigrationInterface
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
10
{
11
    const UPDATE_EXTENSIONS = ['User', 'Profile', 'Content', 'Feedback', 'Search', 'Sitemap', 'Comments', 'Newcontent', 'Contenttag', 'Newcomment'];
12
13
    /**
14
     * Implement new update changes
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        // set nullable varchar type for token column
20
        $this->getSchema()->table('users', function($table){
21
            $table->string('approve_token', 128)->nullable()->default(null)->change();
22
        });
23
        // set approve_token = null where it like '0' str or ''
24
        \Apps\ActiveRecord\User::where('approve_token', '=', '0')
25
            ->update('approve_token', null);
0 ignored issues
show
'approve_token' of type string is incompatible with the type array expected by parameter $attributes of Illuminate\Database\Eloquent\Model::update(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

25
            ->update(/** @scrutinizer ignore-type */ 'approve_token', null);
Loading history...
null of type null is incompatible with the type array expected by parameter $options of Illuminate\Database\Eloquent\Model::update(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

25
            ->update('approve_token', /** @scrutinizer ignore-type */ null);
Loading history...
26
27
        // update comment posts architecture: add app_name and app_id relationship
28
        if (!$this->getSchema()->hasColumn('comment_posts', 'app_name')) {
29
            $this->getSchema()->table('comment_posts', function($table) {
30
                $table->string('app_name')->after('id');
31
            });
32
        }
33
        if (!$this->getSchema()->hasColumn('comment_answers', 'app_relation_id')) {
34
            $this->getSchema()->table('comment_answers', function($table){
35
                $table->integer('app_relation_id')->unsigned()->default(0)->after('app_name');
36
            });
37
        }
38
39
        \Apps\ActiveRecord\App::whereIn('sys_name', static::UPDATE_EXTENSIONS)
40
            ->update(['version' => '1.0.1']);
41
42
        // @todo: add algo to find app_name & app_id for oldest comments
43
        if ($this->getSchema()->hasColumn('comment_posts', 'pathway')) {
44
            $this->getSchema()->table('comment_posts', function($table){
45
                $table->dropColumn('pathway');
46
            });
47
        }
48
        // remove comment_hash column from content
49
        if ($this->getSchema()->hasColumn('contents', 'comment_hash')) {
50
            $this->getSchema()->table('contents', function($table) {
51
                $table->dropColumn('comment_hash');
52
            });
53
        }
54
        // remove user login column
55
        if ($this->getSchema()->hasColumn('users', 'login')) {
56
            $this->getSchema()->table('users', function($table) {
57
                $table->dropColumn('login');
58
            });
59
        }
60
    }
61
62
    /**
63
     * @return void
64
     */
65
    public function down()
66
    {
67
        parent::down(); // TODO: Change the autogenerated stub
68
    }
69
70
    /**
71
     * Seed created table via up() method with some data
72
     * @return void
73
     */
74
    public function seed()
75
    {
76
        // TODO: Implement seed() method.
77
    }
78
}