Issues (167)

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.

admin/broken.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * TDMDownload
7
 *
8
 * You may not change or alter any portion of this comment or credits
9
 * of supporting developers from this source code or any supporting source code
10
 * which is considered copyrighted (c) material of the original comment or credit authors.
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
 * @copyright   Gregory Mage (Aka Mage)
16
 * @license     GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
17
 * @author      Gregory Mage (Aka Mage)
18
 */
19
20
use Xmf\Module\Admin;
21
use XoopsModules\Tdmdownloads\Helper;
22
23
require __DIR__ . '/admin_header.php';
24
// Template
25
$templateMain = 'tdmdownloads_admin_broken.tpl';
26
$helper = Helper::getInstance();
27
//On recupere la valeur de l'argument op dans l'URL$
28
$op = \Xmf\Request::getCmd('op', 'list');
29
//Les valeurs de op qui vont permettre d'aller dans les differentes parties de la page
30
switch ($op) {
31
    // Vue liste
32
    case 'list':
33
        //Affichage de la partie haute de l'administration de Xoops
34
        xoops_cp_header();
35
        $adminObject = Admin::getInstance();
36
        $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation(basename(__FILE__)));
37
        $criteria = new \CriteriaCompo();
38
        if (\Xmf\Request::hasVar('limit', 'REQUEST')) {
39
            $criteria->setLimit(\Xmf\Request::getInt('limit', 0, 'REQUEST'));
40
            $limit = \Xmf\Request::getInt('limit', 0, 'REQUEST');
41
        } else {
42
            $criteria->setLimit($helper->getConfig('perpageadmin'));
43
            $limit = $helper->getConfig('perpageadmin');
44
        }
45
        if (\Xmf\Request::hasVar('start', 'REQUEST')) {
46
            $criteria->setStart(\Xmf\Request::getInt('start', 0, 'REQUEST'));
47
            $start = \Xmf\Request::getInt('start', 0, 'REQUEST');
48
        } else {
49
            $criteria->setStart(0);
50
            $start = 0;
51
        }
52
        $criteria->setSort('reportid');
53
        $criteria->setOrder('ASC');
54
        //pour faire une jointure de table
55
        $brokenHandler->table_link   = $brokenHandler->db->prefix('tdmdownloads_downloads'); // Nom de la table en jointure
56
        $brokenHandler->field_link   = 'lid'; // champ de la table en jointure
57
        $brokenHandler->field_object = 'lid'; // champ de la table courante
58
        $brokenArray                 = $brokenHandler->getByLink($criteria);
59
        $numrows                     = $brokenHandler->getCount($criteria);
60
        $pagenav                     = '';
61
        if ($numrows > $limit) {
62
            $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=list&limit=' . $limit);
63
            $pagenav = $pagenav->renderNav(4);
64
        }
65
        //Affichage du tableau des téléchargements brisés
66
        if ($numrows > 0) {
67
            $GLOBALS['xoopsTpl']->assign('broken_count', $numrows);
68
            $broken = [];
69
            foreach (array_keys($brokenArray) as $i) {
70
                /** @var \XoopsModules\Tdmdownloads\Broken[] $brokenArray */
71
                $broken = [
72
                    'lid'      => $brokenArray[$i]->getVar('lid'),
73
                    'reportid' => $brokenArray[$i]->getVar('reportid'),
74
                    'title'    => $brokenArray[$i]->getVar('title'),
75
                    'cid'      => $brokenArray[$i]->getVar('cid'),
76
                    'sender'   => \XoopsUser::getUnameFromId($brokenArray[$i]->getVar('sender')),
77
                    'ip'       => $brokenArray[$i]->getVar('ip'),
78
                ];
79
                $GLOBALS['xoopsTpl']->append('broken_list', $broken);
80
                unset($broken);
81
            }
82
        } else {
83
            $GLOBALS['xoopsTpl']->assign('message_erreur', _AM_TDMDOWNLOADS_ERREUR_NOBROKENDOWNLOADS);
84
        }
85
        break;
86
    // permet de suprimmer le rapport de téléchargment brisé
87
    case 'del_brokendownloads':
88
        $obj = $brokenHandler->get(\Xmf\Request::getInt('broken_id', 0, 'REQUEST'));
89
        if (\Xmf\Request::hasVar('ok', 'REQUEST') && 1 == \Xmf\Request::getInt('ok', 0, 'REQUEST')) {
90
            if (!$GLOBALS['xoopsSecurity']->check()) {
91
                redirect_header('downloads.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
92
            }
93
            if ($brokenHandler->delete($obj)) {
94
                redirect_header('broken.php', 1, _AM_TDMDOWNLOADS_REDIRECT_DELOK);
95
            }
96
            $GLOBALS['xoopsTpl']->assign('message_erreur', $obj->getHtmlErrors());
97
        } else {
98
            //Affichage de la partie haute de l'administration de Xoops
99
            xoops_cp_header();
100
            $adminObject = Admin::getInstance();
101
            $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('broken.php'));
102
            $adminObject->addItemButton(_MI_TDMDOWNLOADS_ADMENU4, 'broken.php?op=list', 'list');
103
            $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left'));
104
            xoops_confirm(['ok' => 1, 'broken_id' => \Xmf\Request::getInt('broken_id', 0, 'REQUEST'), 'op' => 'del_brokendownloads'], $_SERVER['REQUEST_URI'], _AM_TDMDOWNLOADS_BROKEN_SURDEL . '<br>');
105
        }
106
        break;
107
}
108
// Local icons path
109
if (is_object($helper->getModule())) {
110
    $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
111
    $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
112
    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
0 ignored issues
show
Are you sure $pathModIcon16 of type array|string can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

112
    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . /** @scrutinizer ignore-type */ $pathModIcon16);
Loading history...
113
    $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
114
}
115
//Affichage de la partie basse de l'administration de Xoops
116
require_once __DIR__ . '/admin_footer.php';
117