Issues (496)

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.

class/About.php (1 issue)

Labels
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 namespace XoopsModules\Smartobject;
2
//
3
4
// 2012-01-01 K.OHWADA
5
// PHP 5.3: Assigning the return value of new by reference is now deprecated.
6
7
/**
8
 * Id: smartobjectabout.php 159 2007-12-17 16:44:05Z malanciault
9
 * Module: SmartObject
10
 * Author: The SmartFactory <www.smartfactory.ca>
11
 * Licence: GNU
12
 */
13
14
use XoopsModuleHandler;
15
use XoopsModules\Smartobject;
16
17
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
18
19
/**
20
 * Class About is a simple class that lets you build an about page
21
 * @author The SmartFactory <www.smartfactory.ca>
22
 */
23
class About
24
{
25
    public $_lang_aboutTitle;
26
    public $_lang_author_info;
27
    public $_lang_developer_lead;
28
    public $_lang_developer_contributor;
29
    public $_lang_developer_website;
30
    public $_lang_developer_email;
31
    public $_lang_developer_credits;
32
    public $_lang_module_info;
33
    public $_lang_module_status;
34
    public $_lang_module_release_date;
35
    public $_lang_module_demo;
36
    public $_lang_module_support;
37
    public $_lang_module_bug;
38
    public $_lang_module_submit_bug;
39
    public $_lang_module_feature;
40
    public $_lang_module_submit_feature;
41
    public $_lang_module_disclaimer;
42
    public $_lang_author_word;
43
    public $_lang_version_history;
44
    public $_lang_by;
45
    public $_tpl;
46
47
    /**
48
     * SmartobjectAbout constructor.
49
     * @param string $aboutTitle
50
     */
51
    public function __construct($aboutTitle = 'About')
52
    {
53
        global $xoopsModule, $xoopsConfig;
54
55
        /** @var Smartobject\Helper $helper */
56
        $helper = Smartobject\Helper::getInstance();
57
        $helper->loadLanguage('modinfo');
58
        
59
        $this->_aboutTitle = $aboutTitle;
0 ignored issues
show
The property _aboutTitle does not seem to exist. Did you mean _lang_aboutTitle?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
60
61
        $this->_lang_developer_contributor = _CO_SOBJECT_DEVELOPER_CONTRIBUTOR;
62
        $this->_lang_developer_website     = _CO_SOBJECT_DEVELOPER_WEBSITE;
63
        $this->_lang_developer_email       = _CO_SOBJECT_DEVELOPER_EMAIL;
64
        $this->_lang_developer_credits     = _CO_SOBJECT_DEVELOPER_CREDITS;
65
        $this->_lang_module_info           = _CO_SOBJECT_MODULE_INFO;
66
        $this->_lang_module_status         = _CO_SOBJECT_MODULE_STATUS;
67
        $this->_lang_module_release_date   = _CO_SOBJECT_MODULE_RELEASE_DATE;
68
        $this->_lang_module_demo           = _CO_SOBJECT_MODULE_DEMO;
69
        $this->_lang_module_support        = _CO_SOBJECT_MODULE_SUPPORT;
70
        $this->_lang_module_bug            = _CO_SOBJECT_MODULE_BUG;
71
        $this->_lang_module_submit_bug     = _CO_SOBJECT_MODULE_SUBMIT_BUG;
72
        $this->_lang_module_feature        = _CO_SOBJECT_MODULE_FEATURE;
73
        $this->_lang_module_submit_feature = _CO_SOBJECT_MODULE_SUBMIT_FEATURE;
74
        $this->_lang_module_disclaimer     = _CO_SOBJECT_MODULE_DISCLAIMER;
75
        $this->_lang_author_word           = _CO_SOBJECT_AUTHOR_WORD;
76
        $this->_lang_version_history       = _CO_SOBJECT_VERSION_HISTORY;
77
    }
78
79
    /**
80
     * @param $value
81
     * @return mixed
82
     */
83
    public function sanitize($value)
84
    {
85
        $myts = \MyTextSanitizer::getInstance();
86
87
        return $myts->displayTarea($value, 1);
88
    }
89
90
    public function render()
91
    {
92
        /**
93
         * @todo move the output to a template
94
         * @todo make the output XHTML compliant
95
         */
96
97
        $myts = \MyTextSanitizer::getInstance();
98
99
        global $xoopsModule;
100
101
        Smartobject\Utility::getXoopsCpHeader();
102
103
        /** @var XoopsModuleHandler $moduleHandler */
104
        $moduleHandler = xoops_getHandler('module');
105
        $versioninfo   = $moduleHandler->get($xoopsModule->getVar('mid'));
106
107
        //Smartobject\Utility::getAdminMenu(-1, $this->_aboutTitle . " " . $versioninfo->getInfo('name'));
108
109
        require_once XOOPS_ROOT_PATH . '/class/template.php';
110
111
        // ---
112
        // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
113
        //      $this->_tpl = new \XoopsTpl();
114
        $this->_tpl = new \XoopsTpl();
115
        // ---
116
117
        $this->_tpl->assign('module_url', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/');
118
        $this->_tpl->assign('module_image', $versioninfo->getInfo('image'));
119
        $this->_tpl->assign('module_name', $versioninfo->getInfo('name'));
120
        $this->_tpl->assign('module_version', $versioninfo->getInfo('version'));
121
        $this->_tpl->assign('module_status_version', $versioninfo->getInfo('status_version'));
122
123
        // Left headings...
124
        if ('' !== $versioninfo->getInfo('author_realname')) {
125
            $author_name = $versioninfo->getInfo('author') . ' (' . $versioninfo->getInfo('author_realname') . ')';
126
        } else {
127
            $author_name = $versioninfo->getInfo('author');
128
        }
129
        $this->_tpl->assign('module_author_name', $author_name);
130
131
        $this->_tpl->assign('module_license', $versioninfo->getInfo('license'));
132
133
        $this->_tpl->assign('module_credits', $versioninfo->getInfo('credits'));
134
135
        // Developers Information
136
        $this->_tpl->assign('module_developer_lead', $versioninfo->getInfo('developer_lead'));
137
        $this->_tpl->assign('module_developer_contributor', $versioninfo->getInfo('developer_contributor'));
138
        $this->_tpl->assign('module_developer_website_url', $versioninfo->getInfo('developer_website_url'));
139
        $this->_tpl->assign('module_developer_website_name', $versioninfo->getInfo('developer_website_name'));
140
        $this->_tpl->assign('module_developer_email', $versioninfo->getInfo('developer_email'));
141
142
        $people = $versioninfo->getInfo('people');
143
        if ($people) {
144
            $this->_tpl->assign('module_people_developers', isset($people['developers']) ? array_map([$this, 'sanitize'], $people['developers']) : false);
145
            $this->_tpl->assign('module_people_testers', isset($people['testers']) ? array_map([$this, 'sanitize'], $people['testers']) : false);
146
            $this->_tpl->assign('module_people_translators', isset($people['translators']) ? array_map([$this, 'sanitize'], $people['translators']) : false);
147
            $this->_tpl->assign('module_people_documenters', isset($people['documenters']) ? array_map([$this, 'sanitize'], $people['documenters']) : false);
148
            $this->_tpl->assign('module_people_other', isset($people['other']) ? array_map([$this, 'sanitize'], $people['other']) : false);
149
        }
150
        //$this->_tpl->assign('module_developers', $versioninfo->getInfo('developer_email'));
151
152
        // Module Development information
153
        $this->_tpl->assign('module_date', $versioninfo->getInfo('date'));
154
        $this->_tpl->assign('module_status', $versioninfo->getInfo('status'));
155
        $this->_tpl->assign('module_demo_site_url', $versioninfo->getInfo('demo_site_url'));
156
        $this->_tpl->assign('module_demo_site_name', $versioninfo->getInfo('demo_site_name'));
157
        $this->_tpl->assign('module_support_site_url', $versioninfo->getInfo('support_site_url'));
158
        $this->_tpl->assign('module_support_site_name', $versioninfo->getInfo('support_site_name'));
159
        $this->_tpl->assign('module_submit_bug', $versioninfo->getInfo('submit_bug'));
160
        $this->_tpl->assign('module_submit_feature', $versioninfo->getInfo('submit_feature'));
161
162
        // Warning
163
        $this->_tpl->assign('module_warning', $this->sanitize($versioninfo->getInfo('warning')));
164
165
        // Author's note
166
        $this->_tpl->assign('module_author_word', $versioninfo->getInfo('author_word'));
167
168
        // For changelog thanks to 3Dev
169
        global $xoopsModule;
170
        $filename = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/changelog.txt';
171
        if (is_file($filename)) {
172
            $filesize = filesize($filename);
173
            $handle   = fopen($filename, 'r');
174
            $this->_tpl->assign('module_version_history', $myts->displayTarea(fread($handle, $filesize), true));
175
            fclose($handle);
176
        }
177
178
        $this->_tpl->display('db:smartobject_about.tpl');
179
180
        Smartobject\Utility::getModFooter();
181
182
        xoops_cp_footer();
183
    }
184
}
185