Issues (519)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

class/Files/Docs/DocsFiles.php (2 issues)

1
<?php namespace XoopsModules\Tdmcreate\Files\Docs;
2
3
use XoopsModules\Tdmcreate;
4
use XoopsModules\Tdmcreate\Files;
5
6
/*
7
 You may not change or alter any portion of this comment or credits
8
 of supporting developers from this source code or any supporting source code
9
 which is considered copyrighted (c) material of the original comment or credit authors.
10
11
 This program is distributed in the hope that it will be useful,
12
 but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 */
15
/**
16
 * tdmcreate module.
17
 *
18
 * @copyright       XOOPS Project (https://xoops.org)
19
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
20
 *
21
 * @since           2.5.0
22
 *
23
 * @author          Txmod Xoops http://www.txmodxoops.org
24
 *
25
 * @version         $Id: DocsFiles.php 12258 2014-01-02 09:33:29Z timgno $
26
 */
27
28
/**
29
 * Class DocsFiles.
30
 */
31
class DocsFiles extends Files\CreateFile
32
{
33
    /**
34
    *  @public function constructor
35
    *  @param null
36
    */
37
38
    public function __construct()
39
    {
40
        parent::__construct();
41
    }
42
43
    /**
44
    *  @static function getInstance
45
    *  @param null
46
    */
47
    /**
48
     * @return DocsFiles
49
     */
50
    public static function getInstance()
51
    {
52
        static $instance = false;
53
        if (!$instance) {
54
            $instance = new self();
55
        }
56
57
        return $instance;
58
    }
59
60
    /**
61
    *  @public function write
62
    *  @param string $module
63
    *  @param string $filename
64
    */
65
    /**
66
     * @param $module
67
     * @param $filename
68
     */
69
    public function write($module, $filename)
70
    {
71
        $this->setModule($module);
72
        $this->setFileName($filename);
73
    }
74
75
    /**
76
    *  @public function getChangeLogFile
77
    *  @param string $moduleDirname
78
    *  @param string $mod_version
79
    *  @param string $mod_author
80
    */
81
    /**
82
     * @param $moduleDirname
83
     * @param $mod_version
84
     * @param $mod_author
85
     *
86
     * @return string
87
     */
88
    public function getChangeLogFile($moduleDirname, $mod_version, $mod_author)
89
    {
90
        $date = date('Y/m/d G:i:s');
91
        $ret = <<<EOT
92
====================================
93
 {$date} Version {$mod_version}
94
====================================
95
 - Original release {$moduleDirname} created with tdmcreate module by ({$mod_author})
96
EOT;
97
98
        return $ret;
99
    }
100
101
    /**
102
    *  @public function getCreditsFile
103
     * @param $mod_author
104
     * @param $mod_credits
105
     * @param $mod_author_website_url
106
     * @param $mod_description
107
     *
108
     * @return string
109
     */
110
    public function getCreditsFile($mod_author, $mod_credits, $mod_author_website_url, $mod_description)
111
    {
112
        $ret = <<<EOT
113
Read Me First
114
=============
115
116
Originally created by the {$mod_author}.
117
118
Modified by {$mod_credits} ({$mod_author_website_url})
119
120
Contributors: {$mod_credits} ({$mod_author_website_url})
121
122
{$mod_description}
123
EOT;
124
125
        return $ret;
126
    }
127
128
    /**
129
    *  @public function getInstallFile
130
    *  @param null
131
     * @return string
132
     */
133
    public function getInstallFile()
134
    {
135
        $ret = <<<'EOT'
136
Read Me First
137
=============
138
139
Install just like another XOOPS module
140
EOT;
141
142
        return $ret;
143
    }
144
145
    /**
146
    *  @public function getReadmeFile
147
    *  @param null
148
     * @return string
149
     */
150
    public function getReadmeFile()
151
    {
152
        $ret = <<<'EOT'
153
Read Me First
154
=============
155
156
Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory
157
Read the table in admin help for the accurate description of the functionality of this module
158
EOT;
159
160
        return $ret;
161
    }
162
163
    /**
164
    *  @public function getLangDiffFile
165
     * @param $mod_version
166
     *
167
     * @return string
168
     */
169
    public function getLangDiffFile($mod_version)
170
    {
171
        $ret = <<<EOT
172
List of added language defines
173
=============
174
175
// {$mod_version}
176
EOT;
177
178
        return $ret;
179
    }
180
181
    /**
182
    *  @public function render
183
    *  @param null
184
     * @return bool|string
185
     */
186
    public function render()
187
    {
188
        $module = $this->getModule();
189
        $moduleDirname = $module->getVar('mod_dirname');
190
        $mod_author = $module->getVar('mod_author');
191
        $mod_credits = $module->getVar('mod_credits');
192
        $mod_author_website_url = $module->getVar('mod_author_website_url');
193
        $mod_description = $module->getVar('mod_description');
194
        switch ($filename = $this->getFileName()) {
195
            case 'changelog':
196
                $content = $this->getChangeLogFile($moduleDirname, $mod_version, $mod_author);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $mod_version seems to be never defined.
Loading history...
197
                break;
198
            case 'credits':
199
                $content = $this->getCreditsFile($mod_author, $mod_credits, $mod_author_website_url, $mod_description);
200
                break;
201
            case 'install':
202
                $content = $this->getInstallFile();
203
                break;
204
            case 'readme':
205
                $content = $this->getReadmeFile();
206
                break;
207
            case 'lang_diff':
208
                $content = $this->getLangDiffFile($mod_version);
209
                break;
210
        }
211
        $this->create($moduleDirname, 'docs', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $content does not seem to be defined for all execution paths leading up to this point.
Loading history...
212
213
        return $this->renderFile();
214
    }
215
}
216