Issues (399)

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.

code/interface/DMSDocumentInterface.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
 * Interface for a DMSDocument used in the Document Management System. A DMSDocument is create by storing a File
4
 * object in an instance of the DMSInterface. All write operations on the DMSDocument create a new relation, so we
5
 * never need to explicitly call the write() method on the DMSDocument DataObject
6
 */
7
interface DMSDocumentInterface
8
{
9
    /**
10
     * Returns a link to download this DMSDocument from the DMS store
11
     * @return String
12
     */
13
    public function getLink();
14
15
    /**
16
     * Return the extension of the file associated with the document
17
     */
18
    public function getExtension();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
19
20
    /**
21
     * Returns the size of the file type in an appropriate format.
22
     *
23
     * @return string
24
     */
25
    public function getSize();
26
27
    /**
28
     * Return the size of the file associated with the document, in bytes.
29
     *
30
     * @return int
31
     */
32
    public function getAbsoluteSize();
33
34
35
    /**
36
     * Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file
37
     * but keeping the rest of the document unchanged.
38
     * @param $file File object, or String that is path to a file to store
39
     * @return DMSDocumentInstance Document object that we replaced the file in
40
     */
41
    public function replaceDocument($file);
42
43
    /**
44
     * Hides the DMSDocument, so it does not show up when getByPage($myPage) is called
45
     * (without specifying the $showEmbargoed = true parameter). This is similar to expire, except that this method
46
     * should be used to hide DMSDocuments that have not yet gone live.
47
     * @return null
48
     */
49
    public function embargoIndefinitely();
50
51
    /**
52
     * Returns if this is DMSDocument is embargoed or expired.
53
     * @return bool True or False depending on whether this DMSDocument is embargoed or expired
54
     */
55
    public function isHidden();
56
57
58
    /**
59
     * Returns if this is DMSDocument is embargoed.
60
     * @return bool True or False depending on whether this DMSDocument is embargoed
61
     */
62
    public function isEmbargoed();
63
64
    /**
65
     * Hides the DMSDocument, so it does not show up when getByPage($myPage) is called. Automatically un-hides the
66
     * DMSDocument at a specific date.
67
     * @param $datetime String date time value when this DMSDocument should expire
68
     * @return null
69
     */
70
    public function embargoUntilDate($datetime);
71
72
    /**
73
     * Hides the document until any page it is linked to is published
74
     * @return null
75
     */
76
    public function embargoUntilPublished();
77
78
    /**
79
     * Clears any previously set embargos, so the DMSDocument always shows up in all queries.
80
     * @return null
81
     */
82
    public function clearEmbargo();
83
84
    /**
85
     * Returns if this is DMSDocument is expired.
86
     * @return bool True or False depending on whether this DMSDocument is expired
87
     */
88
    public function isExpired();
89
90
    /**
91
     * Hides the DMSDocument at a specific date, so it does not show up when getByPage($myPage) is called.
92
     * @param $datetime String date time value when this DMSDocument should expire
93
     * @return null
94
     */
95
    public function expireAtDate($datetime);
96
97
    /**
98
     * Clears any previously set expiry.
99
     * @return null
100
     */
101
    public function clearExpiry();
102
103
    /*---- FROM HERE ON: optional API features ----*/
104
105
    /**
106
     * Returns a DataList of all previous Versions of this DMSDocument (check the LastEdited date of each
107
     * object to find the correct one)
108
     * @return DataList List of DMSDocument objects
109
     */
110
    public function getVersions();
111
}
112