Issues (1177)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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.

application/helpers/siteinfo_helper.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use template_manager\classes\TemplateManager;
4
5
if (!defined('BASEPATH')) {
6
    exit('No direct script access allowed');
7
}
8
9
/**
10
 * ImageCMS
11
 * siteinfo helper
12
 */
13
if (!function_exists('siteinfo')) {
14
15
    /**
16
     * Get information about site
17
     *
18
     * @param string $name - name of siteinfo param
19
     *    - siteinfo_compatyname
20
     *    - siteinfo_address
21
     *    - siteinfo_mainphone
22
     *    - siteinfo_contacts
23
     *    - siteinfo_logo
24
     *    - siteinfo_favicon
25
     *    - "or some contact name"
26
     * @return bool|string
27
     */
28
    function siteinfo($name = NULL) {
29
30
        // for shorter notation...
31
        if (0 !== strpos($name, 'siteinfo_')) {
32
            $name = 'siteinfo_' . $name;
33
        }
34
        $ci = &get_instance();
35
        $ci->load->library('SiteInfo');
36
        $siteinfo = new SiteInfo();
37
        // next code is only for compatibility with older versions of library,
38
        // so in the future needed to be removed (with funciton processOldVersions() too)
39
40
        if (FALSE !== $data = siteInfoAdditionalManipulations($name)) {
0 ignored issues
show
Deprecated Code introduced by
The function siteInfoAdditionalManipulations() has been deprecated with message: since version 4.6

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
41
            return $data;
42
        } else {
43
            $value = $siteinfo->getSiteInfo($name);
44
45
            if (in_array($name, ['siteinfo_logo', 'siteinfo_favicon'])) {
46
                return $ci->siteinfo->imagesPath . $value;
47
            }
48
            return $value;
49
        }
50
    }
51
52
}
53
54
if (!function_exists('siteInfoAdditionalManipulations')) {
55
56
    /**
57
     * Функція існує суто для сумісності із старими версіями
58
     * @deprecated since version 4.6
59
     * @param string $name
60
     * @return string|boolean
61
     */
62
    function siteInfoAdditionalManipulations($name) {
63
        if (FALSE !== strpos($name, '_path')) {
64
            $name = str_replace('_path', '', $name);
65
        }
66
        if (FALSE !== strpos($name, '_url')) {
67
            $name = str_replace('_url', '', $name);
68
        }
69
70
        $siteinfo = new SiteInfo();
71
        $value = $siteinfo->getSiteInfo($name);
72
        switch ($name) {
73
            case 'siteinfo_favicon':
74
            case 'siteinfo_logo':
75
                // із врахуванням активного шаблону
76
                if (is_array($value)) {
77
                    $settings = CI::$APP->cms_base->get_settings();
78
                    if (array_key_exists($settings['site_template'], $value)) {
79
                        $fileName = $value[$settings['site_template']];
80
                        if (SHOP_INSTALLED) {
81
                            $colorScheme = CI::$APP->load->module('template_manager')->getComponent('TColorScheme')->getColorSheme();
82
83
                            return "/templates/{$settings['site_template']}/css/{$colorScheme}/{$fileName}";
84
                        } else {
85
                            return "/templates/{$settings['site_template']}/images/{$fileName}";
86
                        }
87
                    } elseif (count($value) > 0) {
88
                        reset($value);
89
                        $key = key($value);
90
                        if (SHOP_INSTALLED) {
91
                            $colorScheme = CI::$APP->load->module('template_manager')->getComponent('TColorScheme')->getColorSheme();
92
                            $template = TemplateManager::getInstance()->getCurentTemplate();
93
                            return '/templates/' . $template->name . "/css/{$colorScheme}/" . $value[$key];
94
                        } else {
95
                            return "/templates/{$settings['site_template']}/images/" . array_shift($value);
96
                        }
97
                    }
98
                    return '';
99
                } elseif (is_string($value)) {
100
                    return empty($value) ? '' : CI::$APP->siteinfo->imagesPath . $value;
101
                }
102
        }
103
        return false;
104
    }
105
106
}