Issues (132)

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/Go2.php (1 issue)

1
<?php
2
3
namespace XoopsModules\Mastopgo2;
4
5
### =============================================================
6
### Mastop InfoDigital - Paixão por Internet
7
### =============================================================
8
### Classe para Manipulação de Destaques
9
### =============================================================
10
### Developer: Fernando Santos (topet05), [email protected]
11
### Copyright: Mastop InfoDigital © 2003-2007
12
### -------------------------------------------------------------
13
### www.mastop.com.br
14
### =============================================================
15
###
16
### =============================================================
17
18
//require_once XOOPS_ROOT_PATH . '/modules/' . MGO_MOD_DIR . '/class/mastopgeral.class.php';
19
20
/**
21
 * Class Go2
22
 */
23
class Go2 extends Mastop
24
{
25
    /**
26
     * mgo_go2_go2 constructor.
27
     * @param null $id
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $id is correct as it would always require null to be passed?
Loading history...
28
     */
29
    public function __construct($id = null)
30
    {
31
        $this->db     = \XoopsDatabaseFactory::getDatabaseConnection();
32
        $this->tabela = $this->db->prefix(MGO_MOD_TABELA1);
33
        $this->id     = 'go2_10_id';
34
        $this->initVar('go2_10_id', XOBJ_DTYPE_INT, 0);
35
        $this->initVar('sec_10_id', XOBJ_DTYPE_INT, 0);
36
        $this->initVar('go2_30_nome', XOBJ_DTYPE_TXTBOX);
37
        $this->initVar('go2_30_link', XOBJ_DTYPE_URL);
38
        $this->initVar('go2_11_target', XOBJ_DTYPE_INT, 0);
39
        $this->initVar('go2_30_imagem', XOBJ_DTYPE_TXTBOX);
40
        $this->initVar('go2_10_acessos', XOBJ_DTYPE_INT, 0);
41
        $this->initVar('go2_12_ativo', XOBJ_DTYPE_INT, 1);
42
43
        if (!empty($id)) {
44
            if (is_array($id)) {
45
                $this->assignVars($id);
46
            } else {
47
                $this->load((int)$id);
48
            }
49
        }
50
    }
51
52
    /**
53
     * @return bool
54
     */
55
    public function ativar()
56
    {
57
        $sql = 'UPDATE ' . $this->tabela . ' SET go2_12_ativo=1 WHERE ' . $this->id . '=' . $this->getVar($this->id);
58
        if (!$result = $this->db->queryF($sql)) {
59
            return false;
60
        }
61
62
        return true;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    public function desativar()
69
    {
70
        $sql = 'UPDATE ' . $this->tabela . ' SET go2_12_ativo=0 WHERE ' . $this->id . '=' . $this->getVar($this->id);
71
        if (!$result = $this->db->queryF($sql)) {
72
            return false;
73
        }
74
75
        return true;
76
    }
77
78
    /**
79
     * @param bool $html
80
     *
81
     * @return string
82
     */
83
    public function pegaImagem($html = false)
84
    {
85
        return (!$html) ? XOOPS_URL . $this->getVar('go2_30_imagem') : "<img src='" . XOOPS_URL . $this->getVar('go2_30_imagem') . "' alt='" . $this->getVar('go2_30_nome') . "' class='full'>";
86
    }
87
88
    /**
89
     * @param bool $imagem
90
     * @param bool $html
91
     *
92
     * @return string
93
     */
94
    public function pegaLink($imagem = false, $html = true)
95
    {
96
        if (!$html) {
97
            if ('' === $this->getVar('go2_30_link')) {
98
            } else {
99
                return XOOPS_URL . '/modules/' . MGO_MOD_DIR . '/go2.php?tac=' . $this->getVar($this->id);
100
            }
101
        } else {
102
            if (!$imagem) {
103
                if (0 == $this->getVar('go2_11_target')) {
104
                    return "<a href='" . XOOPS_URL . '/modules/' . MGO_MOD_DIR . '/go2.php?tac=' . $this->getVar($this->id) . "' title='" . $this->getVar('go2_30_nome') . "'>" . $this->getVar('go2_30_link') . '</a>';
105
                }
106
107
                return "<a href='" . XOOPS_URL . '/modules/' . MGO_MOD_DIR . '/go2.php?tac=' . $this->getVar($this->id) . "' title='" . $this->getVar('go2_30_nome') . "' target='_blank'>" . $this->getVar('go2_30_link') . '</a>';
108
            }
109
            if (0 == $this->getVar('go2_11_target')) {
110
                return "<a href='" . XOOPS_URL . '/modules/' . MGO_MOD_DIR . '/go2.php?tac=' . $this->getVar($this->id) . "' title='" . $this->getVar('go2_30_nome') . "'>" . $this->pegaImagem(true) . '</a>';
111
            }
112
113
            return "<a href='" . XOOPS_URL . '/modules/' . MGO_MOD_DIR . '/go2.php?tac=' . $this->getVar($this->id) . "' title='" . $this->getVar('go2_30_nome') . "' target='_blank'>" . $this->pegaImagem(true) . '</a>';
114
        }
115
    }
116
117
    /**
118
     * @return bool
119
     */
120
    public function atualizaCount()
121
    {
122
        $sql = 'UPDATE ' . $this->tabela . ' SET go2_10_acessos=go2_10_acessos+1 WHERE ' . $this->id . '=' . $this->getVar($this->id);
123
        if (!$result = $this->db->queryF($sql)) {
124
            return false;
125
        }
126
127
        return true;
128
    }
129
}
130