Issues (24)

Security Analysis    no request data  

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.

src/model/Journal.php (1 issue)

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
 * Class Journal
4
 *
5
 * @author       Denis Shestakov <[email protected]>
6
 * @copyright    Copyright (c) 2017, Lan Publishing
7
 * @license      MIT
8
 */
9
10
namespace Lan\Ebs\Sdk\Model;
11
12
use Exception;
13
use Lan\Ebs\Sdk\Classes\Model;
14
use Lan\Ebs\Sdk\Client;
15
16
/**
17
 * Модель журналов
18
 *
19
 * @property mixed name
20
 * @property mixed description
21
 * @property mixed issn
22
 * @property mixed eissn
23
 * @property mixed vac
24
 * @property mixed year
25
 * @property mixed issuesPerYear
26
 * @property mixed editors
27
 * @property mixed publisher
28
 * @property mixed url
29
 *
30
 * @package      Lan\Ebs
31
 * @subpackage   Sdk
32
 * @category     Model
33
 */
34
class Journal extends Model
35
{
36
    /**
37
     * Наименование журнала
38
     */
39
    const FIELD_NAME = 'name';
40
41
    /**
42
     * Описание журнала
43
     */
44
    const FIELD_DESCRIPTION = 'description';
45
46
    /**
47
     * ISSN журнала
48
     */
49
    const FIELD_ISSN = 'issn';
50
51
    /**
52
     * EISSN журнала
53
     */
54
    const FIELD_EISSN = 'eissn';
55
56
    /**
57
     * Входит в перечень ВАК
58
     */
59
    const FIELD_VAC = 'vac';
60
61
    /**
62
     * Год основания
63
     */
64
    const FIELD_YEAR = 'year';
65
66
    /**
67
     * Выпусков в год
68
     */
69
    const FIELD_ISSUES_PER_YEAR = 'issuesPerYear';
70
71
    /**
72
     * Редакторы
73
     */
74
    const FIELD_EDITORS = 'editors';
75
76
    /**
77
     * Издательство
78
     */
79
    const FIELD_PUBLISHER = 'publisher';
80
81
    /**
82
     * Ссылка на карточку журнала
83
     */
84
    const FIELD_URL = 'url';
85
86
    /**
87
     * Конструктор модели журнала
88
     *
89
     * @param Client $client Инстанс клиента
90
     * @param array $fields Поля для выборки
91
     *
92
     * @throws Exception
93
     */
94
    public function __construct(Client $client, array $fields = array())
95
    {
96
        parent::__construct($client, $fields);
97
    }
98
99
    /**
100
     * Получение данных для запроса через API
101
     *
102
     * @param string $method Http-метод запроса
103
     * @param array $params Параметры для формирования урла
104
     *
105
     * @return array
106
     *
107
     * @throws Exception
108
     */
109 View Code Duplication
    public function getUrl($method, array $params = array())
0 ignored issues
show
This method 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...
110
    {
111
        switch ($method) {
112
            case 'get':
113
                return array(
114
                    'url' => vsprintf('/1.0/resource/journal/get/%d', $params),
115
                    'method' => 'GET',
116
                    'code' => 200
117
                );
118
            default:
119
                throw new Exception('Route for ' . $method . ' not found');
120
        }
121
    }
122
}