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 (1410)

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.

protected/controllers/UserController.php (7 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
 * @author Alexey Tatarinov <[email protected]>
4
 * @link https://github.com/shogodev/argilla/
5
 * @copyright Copyright &copy; 2003-2014 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 * @package frontend.controllers
8
 */
9
class UserController extends FController
10
{
11
  public function actionSocialLogin($service)
12
  {
13
    if( isset($service) )
14
    {
15
      $this->socialRegistration($service);
16
    }
17
  }
18
19 3
  public function actionLogin()
20
  {
21 3
    if( !Yii::app()->user->isGuest )
22 3
      $this->redirect($this->createUrl('userProfile/profile'), true, 200);
23
24 3
    $this->breadcrumbs = array('Вход');
25
26 3
    $loginForm = new FForm('LoginForm', new Login());
27 3
    $loginForm->action = Yii::app()->controller->createUrl('user/login');
28 3
    $loginForm->ajaxSubmit = false;
29 3
    $loginForm->validateOnChange = false;
30 3
    $loginForm->validateOnSubmit = false;
31 3
    $loginForm->autocomplete = true;
32
33 3
    if( $loginForm->process() )
34 2
    {
35 1
      $this->redirect(Yii::app()->user->returnUrl);
36
      Yii::app()->end();
0 ignored issues
show
The method end does only exist in BTestApplication and FTestApplication, but not in BApplication and FApplication.

It seems like the method you are trying to call exists only in some of the possible types.

Let’s take a look at an example:

class A
{
    public function foo() { }
}

class B extends A
{
    public function bar() { }
}

/**
 * @param A|B $x
 */
function someFunction($x)
{
    $x->foo(); // This call is fine as the method exists in A and B.
    $x->bar(); // This method only exists in B and might cause an error.
}

Available Fixes

  1. Add an additional type-check:

    /**
     * @param A|B $x
     */
    function someFunction($x)
    {
        $x->foo();
    
        if ($x instanceof B) {
            $x->bar();
        }
    }
    
  2. Only allow a single type to be passed if the variable comes from a parameter:

    function someFunction(B $x) { /** ... */ }
    
Loading history...
37
    }
38
39 1
    $this->render('login', array('loginForm' => $loginForm));
40 1
  }
41
42 1
  public function actionLogout()
43
  {
44 1
    $returnUrl = Yii::app()->user->returnUrl;
45 1
    Yii::app()->user->logout(false);
46 1
    $this->redirect($returnUrl);
47
    Yii::app()->end();
0 ignored issues
show
The method end does only exist in BTestApplication and FTestApplication, but not in BApplication and FApplication.

It seems like the method you are trying to call exists only in some of the possible types.

Let’s take a look at an example:

class A
{
    public function foo() { }
}

class B extends A
{
    public function bar() { }
}

/**
 * @param A|B $x
 */
function someFunction($x)
{
    $x->foo(); // This call is fine as the method exists in A and B.
    $x->bar(); // This method only exists in B and might cause an error.
}

Available Fixes

  1. Add an additional type-check:

    /**
     * @param A|B $x
     */
    function someFunction($x)
    {
        $x->foo();
    
        if ($x instanceof B) {
            $x->bar();
        }
    }
    
  2. Only allow a single type to be passed if the variable comes from a parameter:

    function someFunction(B $x) { /** ... */ }
    
Loading history...
48
  }
49
50 2
  public function actionRegistration()
51
  {
52 2
    if( Yii::app()->user->isGuest )
53 2
    {
54 2
      $this->breadcrumbs = array('Регистрация');
55
56 2
      $registrationForm = new FForm('UserRegistration', new User());
57 2
      $registrationForm->loadFromSession  = true;
58 2
      $registrationForm->clearAfterSubmit = true;
59 2
      $registrationForm['profile']->model = new UserProfile(User::SCENARIO_REGISTRATION);
60
61 2
      if( Yii::app()->request->isPostRequest )
62 2
        $registrationForm->model->email = CHtml::encode(Yii::app()->request->getParam('email', ''));
63
64 2
      $registrationForm->ajaxValidation();
65
66 2
      if( Yii::app()->request->isAjaxRequest && $registrationForm->save() )
67 2
      {
68
69 1
          Yii::app()->notification->send(
70 1
            'UserRegistration',
71
            array(
72 1
              'model' => $registrationForm->model,
73 1
              'profile' => $registrationForm['profile']->model
74 1
            ),
75 1
            $registrationForm->model->email
76 1
        );
77
78 1
        Yii::app()->notification->send(
79 1
          'UserRegistrationBackend',
80
          array(
81 1
            'model' => $registrationForm->model,
82 1
            'profile' => $registrationForm['profile']->model
83 1
          ),
84 1
          null,
85
          'backend'
86 1
        );
87
88 1
        echo CJSON::encode(array(
89 1
          'status' => 'ok',
90 1
          'messageForm' => $this->textBlockRegister(
91 1
            'Успешная регистрация',
92
            'Регистрация успешно завершена'
93 1
          ),
94 1
          'removeElements' => array('registration-text')
95 1
        ));
96 1
        Yii::app()->end();
0 ignored issues
show
The method end does only exist in BTestApplication and FTestApplication, but not in BApplication and FApplication.

It seems like the method you are trying to call exists only in some of the possible types.

Let’s take a look at an example:

class A
{
    public function foo() { }
}

class B extends A
{
    public function bar() { }
}

/**
 * @param A|B $x
 */
function someFunction($x)
{
    $x->foo(); // This call is fine as the method exists in A and B.
    $x->bar(); // This method only exists in B and might cause an error.
}

Available Fixes

  1. Add an additional type-check:

    /**
     * @param A|B $x
     */
    function someFunction($x)
    {
        $x->foo();
    
        if ($x instanceof B) {
            $x->bar();
        }
    }
    
  2. Only allow a single type to be passed if the variable comes from a parameter:

    function someFunction(B $x) { /** ... */ }
    
Loading history...
97
      }
98
99 1
      $this->render('registration', array('registrationForm' => $registrationForm));
100 1
    }
101
    else
102
    {
103
      $this->render('registration');
104
    }
105 1
  }
106
107 2
  public function actionRestore()
108
  {
109 2
    $this->breadcrumbs = array('Восстановление пароля');
110
111 2
    $restoreForm = new FForm('UserRestore', new RestorePassword(RestorePassword::GENERATE_RESTORE_CODE));
112 2
    $restoreForm->validateOnChange = false;
113 2
    $restoreForm->ajaxValidation();
114
115 2
    if( Yii::app()->request->isAjaxRequest && $restoreForm->process() )
116 2
    {
117 1
      Yii::app()->notification->send(
118 1
        'UserRequestRestorePassword',
119 1
        array('model' => $restoreForm->model),
120 1
        $restoreForm->model->email
121 1
      );
122
123 1
      $restoreForm->responseSuccess(Yii::app()->controller->textBlockRegister(
124 1
        'Email успешно отправлен',
125
        'Вам на E-mail отправлены дальнейшие инструкции'
126 1
      ));
127
    }
128
    else
129 1
      $this->render('restore', array('restoreForm' => $restoreForm));
130 1
  }
131
132 2
  public function actionRestoreConfirmed($code)
133
  {
134 2
    $this->breadcrumbs = array('Восстановление пароля');
135
136 2
    $restorePassword = new RestorePassword(RestorePassword::GENERATE_NEW_PASSWORD);
137 2
    $restorePassword->attributes = array('restoreCode' => $code);
138
139 2
    if( $restorePassword->validate() )
140 2
    {
141 1
      Yii::app()->notification->send(
142 1
        'UserRestorePassword',
143
        array(
144 1
          'model' => $restorePassword,
145 1
          'password' => $restorePassword->user->password
0 ignored issues
show
The property user cannot be accessed from this context as it is declared private in class RestorePassword.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
146 1
        ),
147 1
        $restorePassword->user->email
0 ignored issues
show
The property user cannot be accessed from this context as it is declared private in class RestorePassword.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
148 1
      );
149
150 1
      $this->render('restore', array('restoreForm' => 'Новый пароль выслан на ваш E-mail.'));
151 1
    }
152
    else
153 1
      $this->redirect(array('user/restore'));
154 1
  }
155
156
  private function socialRegistration($service)
157
  {
158
    /**
159
     * @var $eauth EAuthServiceBase
160
     */
161
    $eauth = Yii::app()->eauth->getIdentity($service);
162
    $eauth->redirectUrl = Yii::app()->user->getReturnUrl($this->createAbsoluteUrl('index/index'));
0 ignored issues
show
The property redirectUrl cannot be accessed from this context as it is declared private in class EAuthServiceBase.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
163
    $eauth->cancelUrl = Yii::app()->user->getReturnUrl($this->createAbsoluteUrl('index/index'));
0 ignored issues
show
The property cancelUrl cannot be accessed from this context as it is declared private in class EAuthServiceBase.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
164
165
    try
166
    {
167
      if( $eauth->authenticate() )
168
      {
169
        $identity = new FUserSocialIdentity($eauth);
170
171
        if( $identity->authenticate() )
172
        {
173
          Yii::app()->user->login($identity);
174
          $eauth->redirect();
175
        }
176
        else
177
        {
178
          $eauth->cancel();
179
        }
180
      }
181
182
      Yii::app()->user->setFlash('success', 'Авторизация прошла успешно');
183
184
      // Something went wrong, redirect to login page
185
      $this->redirect(Yii::app()->user->getReturnUrl($this->createAbsoluteUrl('user/data')));
186
    }
187
    catch(EAuthException $e)
188
    {
189
      // save authentication error to session
190
      Yii::app()->user->setFlash('error', 'Ошибка авторизации: '.$e->getMessage());
191
192
      // close popup window and redirect to cancelUrl
193
      $eauth->redirect($eauth->getCancelUrl());
194
    }
195
  }
196
}