Issues (380)

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

Labels
Severity
1
<?php
2
//
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                  Copyright (c) 2000-2020 XOOPS.org                        //
6
//                       <https://xoops.org>                             //
7
//  ------------------------------------------------------------------------ //
8
//  This program is free software; you can redistribute it and/or modify     //
9
//  it under the terms of the GNU General Public License as published by     //
10
//  the Free Software Foundation; either version 2 of the License, or        //
11
//  (at your option) any later version.                                      //
12
//                                                                           //
13
//  You may not change or alter any portion of this comment or credits       //
14
//  of supporting developers from this source code or any supporting         //
15
//  source code which is considered copyrighted (c) material of the          //
16
//  original comment or credit authors.                                      //
17
//                                                                           //
18
//  This program is distributed in the hope that it will be useful,          //
19
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
20
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
21
//  GNU General Public License for more details.                             //
22
//                                                                           //
23
//  You should have received a copy of the GNU General Public License        //
24
//  along with this program; if not, write to the Free Software              //
25
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
26
//  ------------------------------------------------------------------------ //
27
// Author: Kazumi Ono (AKA onokazu)                                          //
28
// URL: http://www.myweb.ne.jp/, https://xoops.org/, http://jp.xoops.org/ //
29
// Project: XOOPS Project                                                    //
30
// ------------------------------------------------------------------------- //
31
32
use Xmf\Request;
33
34
require_once __DIR__ . '/admin_header.php';
35
require_once $GLOBALS['xoops']->path('class/pagenav.php');
36
37
$op   = Request::getCmd('op', Request::getCmd('op', 'default', 'POST'), 'GET'); // !empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:"default");
38
$item = Request::getString('op', Request::getInt('item', 'process', 'POST'), 'GET'); //!empty($_GET['op'])? $_GET['item'] : (!empty($_POST['item'])?$_POST['item']:"process");
0 ignored issues
show
'process' of type string is incompatible with the type integer expected by parameter $default of Xmf\Request::getInt(). ( Ignorable by Annotation )

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

38
$item = Request::getString('op', Request::getInt('item', /** @scrutinizer ignore-type */ 'process', 'POST'), 'GET'); //!empty($_GET['op'])? $_GET['item'] : (!empty($_POST['item'])?$_POST['item']:"process");
Loading history...
39
40
$start = Request::getInt('start', 0, 'GET');
41
//$reportHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Report');
42
43
xoops_cp_header();
44
switch ($op) {
45
    case 'delete':
46
        $digest_ids = Request::getArray('digest_id', [], 'POST');
47
        //        /** @var Newbb\DigestHandler $digestHandler */
48
        //        $digestHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Digest');
49
        foreach ($digest_ids as $did => $value) {
50
            $digest = $digestHandler->get($did);
51
            $digestHandler->delete($digest);
52
        }
53
        redirect_header('admin_digest.php', 1);
54
        break;
55
    case 'digest':
56
        xoops_confirm(['op' => 'digestconfirmed'], 'admin_digest.php', _AM_NEWBB_DIGEST_CONFIRM);
57
        break;
58
    case 'digestconfirmed':
59
        $message = '';
60
        if ('POST' === Request::getMethod()) {
61
            //            $digestHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Digest');
62
63
            switch ($digestHandler->process(true)) {
64
                case 0:
65
                    $message = _AM_NEWBB_DIGEST_SENT;
66
                    break;
67
                case 4:
68
                    $message = _AM_NEWBB_DIGEST_NOT_SENT;
69
                    break;
70
                default:
71
                    $message = _AM_NEWBB_DIGEST_FAILED;
72
                    break;
73
            }
74
        }
75
        redirect_header('admin_digest.php', 1, $message);
76
        break;
77
    default:
78
        require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
79
80
        $limit = 5;
81
        $adminObject->displayNavigation(basename(__FILE__));
82
83
        $adminObject->addItemButton(_AM_NEWBB_DIGEST, 'admin_digest.php?op=digest', $icon = 'add');
84
        $adminObject->displayButton('left');
85
86
        //if (!$newXoopsModuleGui) loadModuleAdminMenu(7,_AM_NEWBB_DIGESTADMIN);
87
        //    else $adminObject->displayNavigation(basename(__FILE__));
88
        echo '<ul><li>' . _AM_NEWBB_DIGEST_HELP_1 . '</li>';
89
        echo '<li>' . _AM_NEWBB_DIGEST_HELP_2 . '</li>';
90
        echo '<li>' . _AM_NEWBB_DIGEST_HELP_3 . '</li>';
91
        echo '<li>' . _AM_NEWBB_DIGEST_HELP_4 . '</li></ul>';
92
        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
93
        echo '<form action="' . xoops_getenv('SCRIPT_NAME') . '" method="post">';
94
        echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
95
        echo "<tr align='center'>";
96
        echo "<th class='bg3' width='2%'>" . _DELETE . '</th>';
97
        echo "<th class='bg3'>" . _AM_NEWBB_DIGESTCONTENT . '</th>';
98
        echo '</tr>';
99
100
        $digests = [];
101
        //        /** @var Newbb\DigestHandler $digestHandler */
102
        //        $digestHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Digest');
103
        $digests = $digestHandler->getAllDigests($start, $limit);
104
        foreach ($digests as $digest) {
105
            echo "<tr class='odd' align='left'>";
106
            echo "<td align='center' ><input type='checkbox' name='digest_id[" . $digest['digest_id'] . "]' value='1' ></td>";
107
            echo '<td><strong>#' . $digest['digest_id'] . ' @ ' . formatTimestamp($digest['digest_time']) . '</strong><br>' . str_replace("\n", '<br>', $digest['digest_content']) . '</td>';
108
            echo '</tr>';
109
            echo "<tr colspan='2'><td height='2'></td></tr>";
110
        }
111
        $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit');
112
        echo "<tr><td colspan='2' align='center'>" . $submit->render() . '</td></tr>';
113
        $hidden = new \XoopsFormHidden('op', 'delete');
114
        echo $hidden->render();
115
        $hidden = new \XoopsFormHidden('item', $item);
116
        echo $hidden->render() . '</form>';
117
118
        echo '</table>';
119
        echo '</td></tr></table>';
120
        echo '<fieldset>';
121
        echo '<legend>&nbsp;' . _AM_NEWBB_PREFERENCES . '&nbsp;-&nbsp;' . _MI_NEWBB_ADMENU_DIGEST . '&nbsp;</legend>';
122
        echo _AM_NEWBB_DIGEST_HELP_AUTO_DIGEST;
123
        echo '</fieldset>';
124
        $nav = new \XoopsPageNav($digestHandler->getDigestCount(), $limit, $start, 'start');
125
        echo $nav->renderNav(4);
126
127
        break;
128
}
129
require_once __DIR__ . '/admin_footer.php';
130