Issues (144)

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.

app/Providers/AppServiceProvider.php (36 issues)

1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Illuminate\Support\Facades\Schema;
7
use Illuminate\Support\Facades\Validator;
8
9
class AppServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap any application services.
13
     *
14
     * @return void
15
     */
16 5
    public function boot()
17
    {
18
        // Fixes incompatibility with MySQL < 5.7.7
19 5
        Schema::defaultStringLength(191);
20
21
        // Create {{ $view_name }} provider in blade templates
22 5
        view()->composer('*', function($view) {
23
            $view_name = str_replace('.', '-', $view->getName());
24
            view()->share('view_name', $view_name);
25 5
        });
26
27 5
        Validator::extend('phone', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

27
        Validator::extend('phone', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

27
        Validator::extend('phone', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
            return preg_match('%^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$%i', $value) && strlen($value) >= 10;
29 5
        });
30
31 5
        Validator::replacer('phone', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

31
        Validator::replacer('phone', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

31
        Validator::replacer('phone', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
            return str_replace(':attribute', $attribute, ':attribute is invalid phone number');
33 5
        });
34
    
35
        //Validator rule for names
36 5
        Validator::extend('name', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

36
        Validator::extend('name', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

36
        Validator::extend('name', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
37
            return preg_match('#(^[[:alnum:]])([\w\-\.\' ]*)([\w\-\.\']$)#', $value);
38 5
        });
39
    
40 5
        Validator::replacer('name', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

40
        Validator::replacer('name', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

40
        Validator::replacer('name', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
41
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use letters, numbers, underscores, dashes, spaces, periods and it must start with a letter or number');
42 5
        });
43
    
44
        //Validator rule for user full names
45 5
        Validator::extend('full_name', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

45
        Validator::extend('full_name', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

45
        Validator::extend('full_name', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
46
            return preg_match('#(^[[:alpha:]])([[:alpha:]\_\-\. ]*)([[:alpha:]\_\-\.]$)#', $value);
47 5
        });
48
    
49 5
        Validator::replacer('full_name', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

49
        Validator::replacer('full_name', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

49
        Validator::replacer('full_name', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
50
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use letters, underscores, dashes, spaces, periods and it must start with a letter');
51 5
        });
52
    
53
        //Validator rule for values
54 5
        Validator::extend('value_string', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

54
        Validator::extend('value_string', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

54
        Validator::extend('value_string', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
55
            return preg_match('#(^[[:alnum:]\+\-])([\w\+\-\.\'\, ]*$)#', $value);
56 5
        });
57
    
58 5
        Validator::replacer('value_string', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

58
        Validator::replacer('value_string', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

58
        Validator::replacer('value_string', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
59
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use alphanumerics spaces +-_.\', and it must start with a alphanumeric or a plus or minus');
60 5
        });
61
    
62
        //Validator rule for types
63 5
        Validator::extend('type_name', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

63
        Validator::extend('type_name', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

63
        Validator::extend('type_name', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
64
            return preg_match('#(^[[:alpha:]\_])([\w]*$)#', $value);
65 5
        });
66
    
67 5
        Validator::replacer('type_name', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

67
        Validator::replacer('type_name', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

67
        Validator::replacer('type_name', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
68
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use alphanumerics, underscores and it must start with a letter or underscore');
69 5
        });
70
    
71
        //Validator rule for error messages
72 5
        Validator::extend('error_string', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

72
        Validator::extend('error_string', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

72
        Validator::extend('error_string', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
73
            return preg_match('#(^[\w])([\w\-\.\'\, ]*$)#', $value);
74 5
        });
75
    
76 5
        Validator::replacer('error_string', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

76
        Validator::replacer('error_string', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

76
        Validator::replacer('error_string', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
77
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use alphanumerics spaces _.\', and it must start with a alphanumeric or underscore');
78 5
        });
79
    
80
        //Validator rule for mac addresses
81 5
        Validator::extend('mac', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

81
        Validator::extend('mac', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

81
        Validator::extend('mac', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
82
            return preg_match('#^(([[:xdigit:]]{2}){6})$#', $value);
83 5
        });
84
    
85 5
        Validator::replacer('mac', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

85
        Validator::replacer('mac', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

85
        Validator::replacer('mac', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
86
            return str_replace(':attribute', $attribute, ':attribute is invalid you must provide a valid mac address like 000000000000');
87 5
        });
88
    
89
        //Validator rule for versions
90 5
        Validator::extend('version', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

90
        Validator::extend('version', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

90
        Validator::extend('version', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
91
            return preg_match('#(^[0-9])(([\+\-\.][[:alnum:]]+)*$)#', $value);
92 5
        });
93
    
94 5
        Validator::replacer('version', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

94
        Validator::replacer('version', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

94
        Validator::replacer('version', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
95
            return str_replace(':attribute', $attribute, ':attribute is invalid you can only use alphanumerics +-. and it must start with a number and end with an alphanumeric');
96 5
        });
97
    
98
        //Validator rule for uuid
99 5
        Validator::extend('uuid', function($attribute, $value, $parameters, $validator) {
0 ignored issues
show
The parameter $validator is not used and could be removed. ( Ignorable by Annotation )

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

99
        Validator::extend('uuid', function($attribute, $value, $parameters, /** @scrutinizer ignore-unused */ $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

99
        Validator::extend('uuid', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters, $validator) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
100
            return preg_match('#^([[:xdigit:]]{8})(-[[:xdigit:]]{4}){3}(-[[:xdigit:]]{12})$#', $value);
101 5
        });
102
    
103 5
        Validator::replacer('uuid', function($message, $attribute, $rule, $parameters) {
0 ignored issues
show
The parameter $rule is not used and could be removed. ( Ignorable by Annotation )

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

103
        Validator::replacer('uuid', function($message, $attribute, /** @scrutinizer ignore-unused */ $rule, $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parameters is not used and could be removed. ( Ignorable by Annotation )

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

103
        Validator::replacer('uuid', function($message, $attribute, $rule, /** @scrutinizer ignore-unused */ $parameters) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
104
            return str_replace(':attribute', $attribute, ':attribute is invalid you must provide five groups of hexadecimals in the form 8-4-4-4-12');
105 5
        });
106 5
    }
107
108
    /**
109
     * Register any application services.
110
     *
111
     * @return void
112
     */
113 5
    public function register()
114
    {
115
        //
116 5
    }
117
}
118