Issues (292)

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.

blocks/maps.php (4 issues)

1
<?php declare(strict_types=1);
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    XOOPS Project (https://xoops.org)
14
 * @license      GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15
 * @author       XOOPS Development Team
16
 * @author       Pascal Le Boustouller: original author ([email protected])
17
 * @author       Luc Bizet (www.frxoops.org)
18
 * @author       jlm69 (www.jlmzone.com)
19
 * @author       mamba (www.xoops.org)
20
 */
21
22
use XoopsModules\Adslight\Helper;
23
24
/** @var Helper $helper */
25
26
// <{$xoops_url}>/modules/adslight/maps/<{$block.mapsname}>/assets/images/map.png
27
28
/**
29
 * @param array $options
30
 *
31
 * @return array|false
32
 */
33
function adslight_maps_show($options)
0 ignored issues
show
The parameter $options is not used and could be removed. ( Ignorable by Annotation )

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

33
function adslight_maps_show(/** @scrutinizer ignore-unused */ $options)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
{
35
    if (!class_exists(Helper::class)) {
36
        return [];
37
    }
38
39
    $helper = Helper::getInstance();
0 ignored issues
show
The assignment to $helper is dead and can be removed.
Loading history...
40
41
    global $xoopsConfig, $block_lang;
42
    $maps_name = $xoopsConfig['language'];
0 ignored issues
show
The assignment to $maps_name is dead and can be removed.
Loading history...
43
    $block     = [];
44
    $myts      = \MyTextSanitizer::getInstance();
0 ignored issues
show
The assignment to $myts is dead and can be removed.
Loading history...
45
46
    $moduleDirName = \basename(\dirname(__DIR__));
47
    $block_lang    = '_MB_' . mb_strtoupper($moduleDirName);
48
49
    $block['title'] = constant("{$block_lang}_TITLE");
50
    //@todo - move language string to language file
51
    $block['imgmapsurl'] = '<a title="Recherche dans votre region" href="' . XOOPS_URL . '/modules/adslight/maps.php"><img src="' . XOOPS_URL . '/modules/adslight/maps/' . $xoopsConfig['language'] . '/assets/images/map.png" alt="Recherche dans votre region" border="0"></a><br>';
52
53
    $block['link'] = '<a href="' . XOOPS_URL . "/modules/{$moduleDirName}/\"><b>" . constant("{$block_lang}_ALL_LISTINGS") . '</b></a><br>';
54
    $block['add']  = '<a href="' . XOOPS_URL . "/modules/{$moduleDirName}/\"><b>" . constant("{$block_lang}_ADDNOW") . '</b></a><br>';
55
56
    return $block;
57
}
58
59
/**
60
 * @param array $options
61
 *
62
 * @return string html form to display
63
 */
64
function adslight_maps_edit($options): string
65
{
66
    $moduleDirName = \basename(\dirname(__DIR__));
67
    $block_lang    = '_MB_' . mb_strtoupper($moduleDirName);
68
69
    $form = constant("{$block_lang}_ORDER") . "&nbsp;<select name='options[]'>";
70
    $form .= "<option value='date_created'";
71
    if ('date_created' === $options[0]) {
72
        $form .= ' selected';
73
    }
74
    $form .= '>' . constant($block_lang . '_DATE') . "</option>\n";
75
76
    $form .= "<option value='hits'";
77
    if ('hits' === $options[0]) {
78
        $form .= ' selected';
79
    }
80
    $form .= '>' . constant("{$block_lang}_HITS") . '</option>';
81
    $form .= "</select>\n";
82
83
    $form .= '&nbsp;' . constant("{$block_lang}_DISP") . "&nbsp;<input type='text' name='options[]' value='{$options[1]}'>&nbsp;" . constant("{$block_lang}_LISTINGS");
84
    $form .= '&nbsp;<br><br>' . constant("{$block_lang}_CHARS") . "&nbsp;<input type='text' name='options[]' value='{$options[2]}'>&nbsp;" . constant("{$block_lang}_LENGTH") . '<br><br>';
85
86
    return $form;
87
}
88