GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (699)

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.

mvc/controladores/usuarioControlador.php (8 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
class usuarioControlador extends \Sistema\Nucleo\CFControlador
5
{
6
    private $_ayuda;
7
    private $_seg;
8
    private $_sesion;    
9 View Code Duplication
    public function __construct() {
10
        parent::__construct();
11
               
12
        // cargamos la clase ayudantes para usar sus metodos de ayuda       
13
        $this->_ayuda= new Sistema\Ayudantes\CFPHPAyuda;        
14
        $this->_seg= new Sistema\Ayudantes\CFPHPSeguridad;
15
        $this->_sesion=new Sistema\Nucleo\CFSesion();       
16
    }    
17
    
18
    public function index(){     
19
        $this->_sesion->iniciarSesion('_s', Cf_SESION_PARAMETRO_SEGURO);
20
        session_destroy();
21
        $this->_vista->titulo = 'CalimaFramework Login';
0 ignored issues
show
The property titulo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
22
        $this->_vista->error = 'CalimaFramework Login';
0 ignored issues
show
The property error does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
23
        $this->_vista->imprimirVista('index', 'usuario');
0 ignored issues
show
'usuario' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
24
    }  
25
    
26
    public function registro(){ 
27
        $this->_vista->titulo = 'CalimaFramework registro';
0 ignored issues
show
The property titulo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
28
        $this->_vista->imprimirVista('registro', 'usuario');
0 ignored issues
show
'usuario' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
29
        
30
    }
31
    
32
    public function crearRegistro(){
0 ignored issues
show
crearRegistro uses the super-global variable $_POST which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
33
        $datas = $this->cargaModelo('usuario');    
34
        if(isset($_POST['nombre'])){
35
        $nombre=$_POST['nombre'];
36
        $email=$_POST['email'];
37
        $usuario=$_POST['nombre'];
38
         $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
39
        
40
         $datas->insertarRegistro(
41
                     $this->_seg->filtrarTexto($_POST['nombre']),
42
                     $this->_seg->filtrarTexto($_POST['email']),
43
                     '1',
44
                     $clave
45
                    );
46
                $this->_ayuda->redireccionUrl('usuario');       
47
        }
48
        else{
49
            $this->_ayuda->redireccionUrl('usuario/registro');
50
        }
51
    }
52
    
53
    public function valida(){
0 ignored issues
show
valida uses the super-global variable $_POST which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
valida uses the super-global variable $_SESSION which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
54
        if(isset($_POST['usuario'])){
55
        $usuario=$_POST['usuario'];
56
        $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
57
        
58
        $datosUser = $this->cargaModelo('usuario');
59
        $valida=$datosUser->seleccionUsuario($usuario, $clave);  
60
        
61
        if(isset($valida)){
62
            $this->_sesion->iniciarSesion('_s', Cf_SESION_PARAMETRO_SEGURO);
63
            $_SESSION['usuario']=$usuario;             
64
            $_SESSION['id_usuario']=$valida['id_usuario'];
65
            $_SESSION['nivel']=$valida['nivel']; 
66
            $this->_ayuda->redireccionUrl('data/index');         
67
        }
68
       $this->_ayuda->redireccionUrl('usuario');
69
        
70
        }
71
    }
72
    
73
     public function cerrarSesion(){
74
        $this->_sesion->iniciarSesion('_s', false);
75
        session_destroy();
76
        $this->_sesion->destruir('usuario');
77
        $this->_ayuda->redireccionUrl('usuario');
78
        
79
    }
80
}
81