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/Assets/Js/JavascriptJQuery.php (1 issue)

Severity
1
<?php namespace XoopsModules\Tdmcreate\Files\Assets\Js;
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: 1.91 JavascriptJQuery.php 12258 2014-01-02 09:33:29Z timgno $
26
 */
27
28
/**
29
 * Class JavascriptJQuery.
30
 */
31
class JavascriptJQuery 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
     * @return JavascriptJQuery
47
     */
48
    public static function getInstance()
49
    {
50
        static $instance = false;
51
        if (!$instance) {
52
            $instance = new self();
53
        }
54
55
        return $instance;
56
    }
57
58
    /**
59
    *  @public function write
60
    *  @param string $module
61
    *  @param string $filename
62
     */
63
    public function write($module, $filename)
64
    {
65
        $this->setModule($module);
66
        $this->setFileName($filename);
67
    }
68
69
    /**
70
     *  @public function getJavascriptJQueryButtons
71
     *  @param null
72
     *
73
     * @return string
74
     */
75
    public function getJavascriptJQueryButtons()
76
    {
77
        $ret = <<<EOT
78
$(document).ready(function(){
79
    $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button();
80
    $( ".check" ).css("color","#fff").button();
81
    $( ".radio" ).css("color","#fff").buttonset();
82
    $( ".toolbar" ).css("color","#000").buttonset();
83
});\n\n
84
EOT;
85
86
        return $ret;
87
    }
88
89
    /**
90
     *  @public function getJavascriptJQueryPrint
91
     *  @param null
92
     *
93
     * @return string
94
     */
95
    public function getJavascriptJQueryPrint()
96
    {
97
        $ret = <<<'EOT'
98
// <![CDATA[
99
/*------------------------------------------------------------------------------
100
Excerpts from the jsUtilities Library
101
Version:        2.1
102
Homepage:       http://www.easy-designs.net/code/jsUtilities/
103
License:        Creative Commons Attribution-ShareAlike 2.0 License
104
				http://creativecommons.org/licenses/by-sa/2.0/
105
Note:           If you change or improve on this script, please let us know.
106
------------------------------------------------------------------------------*/
107
if(Array.prototype.push === null) {
108
  Array.prototype.push = function(item) {
109
	this[this.length] = item;
110
	return this.length;
111
  }
112
}
113
// ---------------------------------------------------------------------
114
//                  function.apply (if unsupported)
115
//           Courtesy of Aaron Boodman - http://youngpup.net
116
// ---------------------------------------------------------------------
117
if (!Function.prototype.apply) {
118
  Function.prototype.apply = function(oScope, args) {
119
	var sarg = [];
120
	var rtrn, call;
121
	if (!oScope) oScope = window;
122
	if (!args) args = [];
123
	for (var i = 0; i < args.length; i++) {
124
	  sarg[i] = "args["+i+"]";
125
	}
126
	call = "oScope.__applyTemp__(" + sarg.join(",") + ");";
127
	oScope.__applyTemp__ = this;
128
	rtrn = eval(call);
129
	oScope.__applyTemp__ = null;
130
	return rtrn;
131
  }
132
}
133
function inArray(needle) {
134
  for (var i=0; i < this.length; i++) {
135
	if (this[i] === needle) {
136
	  return i;
137
	}
138
  }
139
  return false;
140
}
141
function addClass(theClass) {
142
  if (this.className != '') {
143
	this.className += ' ' + theClass;
144
  } else {
145
	this.className = theClass;
146
  }
147
}
148
function lastChildContainingText() {
149
  var testChild = this.lastChild;
150
  var contentCntnr = ['p','li','dd'];
151
  while (testChild.nodeType != 1) {
152
	testChild = testChild.previousSibling;
153
  }
154
  var tag = testChild.tagName.toLowerCase();
155
  var tagInArr = inArray.apply(contentCntnr, [tag]);
156
  if (!tagInArr && tagInArr!==0) {
157
	testChild = lastChildContainingText.apply(testChild);
158
  }
159
  return testChild;
160
}
161
// ]]>
162
EOT;
163
164
        return $ret;
165
    }
166
167
    /**
168
     *  @public function render
169
     *  @param null
170
     *
171
     * @return bool|string
172
     */
173
    public function render()
174
    {
175
        $module = $this->getModule();
176
        $filename = $this->getFileName();
177
        $moduleDirname = $module->getVar('mod_dirname');
178
        $content = $this->getHeaderFilesComments($module, $filename);
0 ignored issues
show
The assignment to $content is dead and can be removed.
Loading history...
179
        $content = $this->getJavascriptJQueryButtons();
180
        $content .= $this->getJavascriptJQueryPrint();
181
182
        $this->create($moduleDirname, 'assets/js', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
183
184
        return $this->renderFile();
185
    }
186
}
187