Issues (1925)

Security Analysis    not enabled

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

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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.

app/Models/GamesFile.php (4 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Models;
9
10
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
11
use Illuminate\Database\Eloquent\Model;
12
use Illuminate\Database\Eloquent\SoftDeletes;
13
14
/**
15
 * Class GamesFile.
16
 *
17
 * @property int $id
18
 * @property int $game_id
19
 * @property int $filesize
20
 * @property string $extension
21
 * @property int $release_type
22
 * @property string $release_version
23
 * @property int $release_year
24
 * @property int $release_month
25
 * @property int $release_day
26
 * @property int $user_id
27
 * @property string $deleted_at
28
 * @property \Carbon\Carbon $created_at
29
 * @property \Carbon\Carbon $updated_at
30
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereId($value)
31
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereGameId($value)
32
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereFilesize($value)
33
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereExtension($value)
34
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReleaseType($value)
35
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReleaseVersion($value)
36
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReleaseYear($value)
37
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReleaseMonth($value)
38
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReleaseDay($value)
39
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereUserId($value)
40
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereDeletedAt($value)
41
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereCreatedAt($value)
42
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereUpdatedAt($value)
43
 * @mixin \Eloquent
44
 * @property string $filename
45
 * @property int $downloadcount
46
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereFilename($value)
47
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereDownloadcount($value)
48
 * @property-read \App\Models\GamesFilesType $gamefiletype
49
 * @property-read \App\Models\Game $game
50
 * @property int $forbidden
51
 * @property string $reason
52
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereForbidden($value)
53
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile whereReason($value)
54
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
55
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PlayerIndexjson[] $playerIndex
56
 * @property-read \App\Models\User $user
57
 * @method static bool|null forceDelete()
58
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile onlyTrashed()
59
 * @method static bool|null restore()
60
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile withTrashed()
61
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesFile withoutTrashed()
62
 */
63 View Code Duplication
class GamesFile extends Model
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
64
{
65
    use \Venturecraft\Revisionable\RevisionableTrait;
66
    use SoftDeletes;
67
68
    public $timestamps = true;
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...
69
    protected $table = 'games_files';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 4 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...
70
    protected $fillable = [
71
        'game_id',
72
        'filesize',
73
        'extension',
74
        'release_type',
75
        'release_version',
76
        'release_year',
77
        'release_month',
78
        'release_day',
79
        'user_id',
80
    ];
81
82
    protected $guarded = [];
83
    protected $dates = ['deleted_at'];
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 3 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...
84
85
    public function gamefiletype()
86
    {
87
        return $this->hasOne('App\Models\GamesFilesType', 'id', 'release_type');
88
    }
89
90
    public function game()
91
    {
92
        return $this->hasOne('App\Models\Game', 'id', 'game_id');
93
    }
94
95
    public function playerIndex()
96
    {
97
        return $this->hasMany('App\Models\PlayerIndexjson', 'gamefile_id', 'id');
98
    }
99
100
    public function user()
101
    {
102
        return $this->hasOne('App\Models\User', 'id', 'user_id');
103
    }
104
}
105