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/Templates/user/Footer.php (2 issues)

1
<?php namespace XoopsModules\Tdmcreate\Files\Templates\User;
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: templates_footer.php 12258 2014-01-02 09:33:29Z timgno $
26
 */
27
28
/**
29
 * class Footer.
30
 */
31
class Footer extends Files\CreateFile
32
{
33
    /**
34
    * @var string
35
    */
36
    private $tdmcfile = null;
0 ignored issues
show
The private property $tdmcfile is not used, and could be removed.
Loading history...
37
38
    /**
39
    *  @public function constructor
40
    *  @param null
41
    */
42
43
    public function __construct()
44
    {
45
        parent::__construct();
46
        $this->htmlcode = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
0 ignored issues
show
Documentation Bug introduced by
It seems like XoopsModules\Tdmcreate\F...rtyCodes::getInstance() of type XoopsModules\Tdmcreate\Files\CreateHtmlSmartyCodes is incompatible with the declared type string of property $htmlcode.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
47
    }
48
49
    /**
50
    *  @static function getInstance
51
    *  @param null
52
     * @return Footer
53
     */
54
    public static function getInstance()
55
    {
56
        static $instance = false;
57
        if (!$instance) {
58
            $instance = new self();
59
        }
60
61
        return $instance;
62
    }
63
64
    /**
65
    *  @public function write
66
    *  @param string $module
67
    *  @param mixed $table
68
    *  @param string $filename
69
     */
70
    public function write($module, $table, $filename)
71
    {
72
        $this->setModule($module);
73
        $this->setTable($table);
74
        $this->setFileName($filename);
75
    }
76
77
    /**
78
     *  @public function getTemplateUserFooterFacebookLikeButton
79
     *  @param null
80
     *
81
     * @return bool|string
82
     */
83
    public function getTemplateUserFooterFacebookLikeButton()
84
    {
85
        return "<li class='fb-like' data-href='<{\$xoops_mpageurl}>' data-layout='standard' data-action='like' data-show-faces='true'></li>";
86
    }
87
88
    /**
89
     *  @public function getTemplateUserFooterFacebookShareButton
90
     *  @param null
91
     *
92
     * @return bool|string
93
     */
94
    public function getTemplateUserFooterFacebookShareButton()
95
    {
96
        return "<li class='fb-share-button' data-href='<{\$xoops_mpageurl}>' data-layout='button_count'></li>";
97
    }
98
99
    /**
100
    *  @public function render
101
    *  @param null
102
     * @return bool|string
103
     */
104
    public function render()
105
    {
106
        $module = $this->getModule();
107
        $table = $this->getTable();
108
        $filename = $this->getFileName();
109
        $moduleDirname = $module->getVar('mod_dirname');
110
        $language = $this->getLanguage($moduleDirname, 'MA');
111
        $content = <<<EOT
112
<{if \$bookmarks != 0}>
113
<{include file="db:system_bookmarks.tpl"}>
114
<{/if}>
115
\n<{if \$fbcomments != 0}>
116
<{include file="db:system_fbcomments.tpl"}>
117
<{/if}>
118
<div class="pull-left"><{\$copyright}></div>\n
119
EOT;
120
        if (is_object($table) && null != $table->getVar('table_name')) {
121
            $content .= <<<EOT
122
<{if \$pagenav != ''}>
123
    <div class="pull-right"><{\$pagenav}></div>
124
<{/if}>
125
<br>\n
126
EOT;
127
        }
128
        $content .= <<<EOT
129
<{if \$xoops_isadmin}>
130
   <div class="text-center bold"><a href="<{\$admin}>"><{\$smarty.const.{$language}ADMIN}></a></div><br>
131
<{/if}>\n
132
EOT;
133
        if (is_object($table)) {
134
            if (1 == $table->getVar('table_comments')) {
135
                $content .= <<<EOT
136
<div class="pad2 marg2">
137
    <{if \$comment_mode == "flat"}>
138
        <{include file="db:system_comments_flat.tpl"}>
139
    <{elseif \$comment_mode == "thread"}>
140
        <{include file="db:system_comments_thread.tpl"}>
141
    <{elseif \$comment_mode == "nest"}>
142
        <{include file="db:system_comments_nest.tpl"}>
143
    <{/if}>
144
</div>\n
145
<br>\n
146
EOT;
147
            }
148
            if (1 == $table->getVar('table_notifications')) {
149
                $content .= <<<'EOT'
150
<{include file='db:system_notification_select.tpl'}>
151
EOT;
152
            }
153
        }
154
        $this->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
155
156
        return $this->renderFile();
157
    }
158
}
159