Issues (15)

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.

lib/Db/OcrJob.php (1 issue)

Severity

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
 * Nextcloud - OCR
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 * 
8
 * @author Janis Koehr <[email protected]>
9
 * @copyright Janis Koehr 2017
10
 */
11
namespace OCA\Ocr\Db;
12
13
use OCP\AppFramework\Db\Entity;
14
use JsonSerializable;
15
16
17
/**
18
 * Class to represent a ocr job.
19
 * 
20
 * @method string getStatus()
21
 * @method void setStatus(string $status)
22
 * @method string getSource()
23
 * @method void setSource(integer $source)
24
 * @method string getTarget()
25
 * @method void setTarget(string $target)
26
 * @method string getTempFile()
27
 * @method void setTempFile(string $tempFile)
28
 * @method string getType()
29
 * @method void setType(string $type)
30
 * @method string getUserId()
31
 * @method void setUserId(string $userId)
32
 * @method boolean getErrorDisplayed()
33
 * @method void setErrorDisplayed(boolean $errorDisplayed)
34
 * @method void setOriginalFilename(string $originalFilename)
35
 * @method string getOriginalFilename()
36
 * @method void setErrorLog(string $errorLog)
37
 * @method string getErrorLog()
38
 * @method boolean getReplace()
39
 * @method void setReplace(boolean $replace)
40
 */
41
class OcrJob extends Entity implements JsonSerializable {
42
43
    /**
44
     *
45
     * @var string
46
     */
47
    protected $status;
48
49
    /**
50
     *
51
     * @var string
52
     */
53
    protected $source;
54
55
    /**
56
     *
57
     * @var string
58
     */
59
    protected $target;
60
61
    /**
62
     *
63
     * @var string
64
     */
65
    protected $tempFile;
66
67
    /**
68
     *
69
     * @var string
70
     */
71
    protected $type;
72
73
    /**
74
     *
75
     * @var string
76
     */
77
    protected $userId;
78
79
    /**
80
     *
81
     * @var boolean
82
     */
83
    protected $errorDisplayed;
84
85
    /**
86
     *
87
     * @var string
88
     */
89
    protected $originalFilename;
90
91
    /**
92
     *
93
     * @var string
94
     */
95
    protected $errorLog;
96
    
97
    /**
98
     * 
99
     * @var boolean
100
     */
101
    protected $replace;
102
103
    /**
104
     * OcrJob constructor.
105
     * 
106
     * @param string $status            
107
     * @param string $source            
108
     * @param string $target            
109
     * @param string $tempFile            
110
     * @param string $type            
111
     * @param string $userId            
112
     * @param boolean $errorDisplayed            
113
     * @param string $originalFilename            
114
     * @param string $errorLog  
115
     * @param boolean $replace          
116
     */
117 21
    public function __construct($status = null, $source = null, $target = null, $tempFile = null, $type = null, $userId = null, 
118
            $errorDisplayed = null, $originalFilename = null, $errorLog = null, $replace = null) {
119 21
        $this->setStatus($status);
120 21
        $this->setSource($source);
121 21
        $this->setTarget($target);
122 21
        $this->setTempFile($tempFile);
123 21
        $this->setType($type);
124 21
        $this->setUserId($userId);
125 21
        $this->setErrorDisplayed($errorDisplayed);
126 21
        $this->setOriginalFilename($originalFilename);
127 21
        $this->setErrorLog($errorLog);
128 21
        $this->setReplace($replace);
129 21
    }
130
131
    /**
132
     * Specify data which should be serialized to JSON
133
     * 
134
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
135
     * @return mixed data which can be serialized by <b>json_encode</b>,
136
     *         which is a value of any type other than a resource.
137
     * @since 5.4.0
138
     */
139 2
    function jsonSerialize() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
140
        return [
141 2
                'id' => $this->id,
142 2
                'status' => $this->status,
143 2
                'source' => $this->source,
144 2
                'target' => $this->target,
145 2
                'tempFile' => $this->tempFile,
146 2
                'type' => $this->type,
147 2
                'userId' => $this->userId,
148 2
                'errorDisplayed' => $this->errorDisplayed,
149 2
                'originalFilename' => $this->originalFilename,
150 2
                'errorLog' => $this->errorLog,
151 2
                'replace' => $this->replace
152
        ];
153
    }
154
}