Issues (608)

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/oledrion_recommended.php (6 issues)

1
<?php
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
 * oledrion
14
 *
15
 * @copyright   {@link https://xoops.org/ XOOPS Project}
16
 * @license     {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
17
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
18
 */
19
20
use XoopsModules\Oledrion;
21
22
/**
23
 * Renvoie la liste des produits recommandés
24
 * @param $options
25
 * @return array|bool
26
 */
27
function b_oledrion_recomm_show($options)
28
{
29
    // '10|0';  // Voir 10 produits, pour toutes les catégories ou une catégorie particulière
30
    global $xoopsConfig, $xoTheme;
31
    require_once XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
32
    $products   = $block = [];
0 ignored issues
show
The assignment to $products is dead and can be removed.
Loading history...
33
    $start      = 0;
34
    $limit      = $options[0];
35
    $categoyrId = $options[1];
36
37
    $shelfParameters->resetDefaultValues()->setProductsType('recommended')->setStart($start)->setLimit($limit)->setSort('product_recommended')->setOrder('DESC')->setCategory($categoyrId);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $shelfParameters seems to be never defined.
Loading history...
38
    $products = $shelf->getProducts($shelfParameters);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $shelf seems to be never defined.
Loading history...
39
40
    if ($productsHandler->getRecommendedCount() > $limit) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $productsHandler does not exist. Did you maybe mean $products?
Loading history...
41
        // Il y a plus de produits recommandés dans la BDD que dans le bloc, on affiche donc un lien vers la page des produits recommandés
42
        $block['showMore'] = true;
43
    }
44
    if (isset($products['lastTitle'])) {
45
        unset($products['lastTitle']);
46
    }
47
    if (count($products) > 0) {
48
        $block['nostock_msg']    = Oledrion\Utility::getModuleOption('nostock_msg');
49
        $block['block_products'] = $products;
50
        $xoTheme->addStylesheet(OLEDRION_URL . 'assets/css/oledrion.css');
51
52
        return $block;
53
    }
54
55
    // Pas de produits recommandés
56
57
    return false;
58
}
59
60
/**
61
 * Paramètres du bloc
62
 * @param $options
63
 * @return string
64
 */
65
function b_oledrion_recomm_edit($options)
66
{
67
    // '10|0';  // Voir 10 produits, pour toutes les catégories
68
    global $xoopsConfig;
69
    require_once XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
70
    // require_once OLEDRION_PATH . 'class/tree.php';
71
    $tblCategories         = [];
0 ignored issues
show
The assignment to $tblCategories is dead and can be removed.
Loading history...
72
    $tblCategories         = $categoryHandler->getAllCategories(new Oledrion\Parameters());
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $categoryHandler seems to be never defined.
Loading history...
73
    $mytree                = new Oledrion\XoopsObjectTree($tblCategories, 'cat_cid', 'cat_pid');
74
    $form                  = '';
75
    $checkeds              = ['', ''];
76
    $checkeds[$options[1]] = 'checked';
77
    $form                  .= "<table border='0'>";
78
    $form                  .= '<tr><td>' . _MB_OLEDRION_PRODUCTS_CNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "'></td></tr>";
79
80
    $select0 = $mytree->makeSelectElement('options[]', 'cat_title', '-', $options[1], true, 0, '', _MB_OLEDRION_ALL_CATEGORIES);
81
    $select  = $select0->render();
82
83
    $form .= '<tr><td>' . _MB_OLEDRION_CATEGORY . '</td><td>' . $select . '</td></tr>';
84
    $form .= '</table>';
85
86
    return $form;
87
}
88
89
/**
90
 * Bloc à la volée
91
 * @param $options
92
 */
93
function b_oledrion_recomm_show_duplicatable($options)
94
{
95
    $options = explode('|', $options);
96
    $block   = b_oledrion_recomm_show($options);
97
98
    $tpl = new \XoopsTpl();
99
    $tpl->assign('block', $block);
100
    $tpl->display('db:oledrion_block_recommended.tpl');
101
}
102