Issues (15)

Security Analysis    no request data  

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.

inc/menu-walkers.php (2 issues)

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
// Oenu walker for top bar
4
/**
5
 * @param $element
6
 * @param $children_elements
7
 * @param $max_depth
8
 * @param $depth
9
 * @param $args
10
 * @param $output
11
 */
12
final class Top_Bar_Walker extends Walker_Nav_Menu
13
{
14
    /**
15
     * @param $element
16
     * @param $children_elements
17
     * @param $max_depth
18
     * @param $depth
19
     * @param $args
20
     * @param $output
21
     */
22 View Code Duplication
    public function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
    {
24
        $element->has_children = !empty($children_elements[$element->ID]);
25
        $element->classes[]    = ($element->current || $element->current_item_ancestor) ? 'active' : '';
26
        $element->classes[]    = ($element->has_children && 1 !== $max_depth) ? 'has-submenu' : '';
27
        parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
28
    }
29
30
    /**
31
     * @param $output
32
     * @param $object
33
     * @param $depth
34
     * @param array                $args
35
     * @param $current_object_id
36
     */
37
    public function start_el(&$output, $object, $depth = 0, $args = [], $current_object_id = 0)
38
    {
39
        $item_html = '';
40
        parent::start_el($item_html, $object, $depth, $args);
41
        //$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
42
        $classes = empty($object->classes) ? [] : (array) $object->classes;
43
44
        if (in_array('label', $classes)) {
45
46
            //$output .= '<li class="divider"></li>';
47
            $item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html);
48
49
        }
50
51
        if (in_array('divider', $classes)) {
52
53
            $item_html = preg_replace('/<a[^>]*>( .* )<\/a>/iU', '', $item_html);
54
55
        }
56
57
        $output .= $item_html;
58
    }
59
60
    /**
61
     * @param $output
62
     * @param $depth
63
     * @param array     $args
64
     */
65
    public function start_lvl(&$output, $depth = 0, $args = [])
66
    {
67
        $output .= "\n<ul class=\"submenu menu vertical\">\n";
68
    }
69
70
}
71
72
// Offcanvas menu walker
73
/**
74
 * @param $element
75
 * @param $children_elements
76
 * @param $max_depth
77
 * @param $depth
78
 * @param $args
79
 * @param $output
80
 */
81
final class Offcanvas_Walker extends Walker_Nav_Menu
82
{
83
                                                             /**
84
     * @param $element
85
     * @param $children_elements
86
     * @param $max_depth
87
     * @param $depth
88
     * @param $args
89
     * @param $output
90
     */
91 View Code Duplication
    public function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
92
    {
93
        $element->has_children = !empty($children_elements[$element->ID]);
94
        $element->classes[]    = ($element->current || $element->current_item_ancestor) ? 'active' : '';
95
        $element->classes[]    = ($element->has_children && 1 !== $max_depth) ? 'has-submenu' : '';
96
        parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
97
    }
98
99
    /**
100
     * @param $output
101
     * @param $object
102
     * @param $depth
103
     * @param array                $args
104
     * @param $current_object_id
105
     */
106
    public function start_el(&$output, $object, $depth = 0, $args = [], $current_object_id = 0)
107
    {
108
        $item_html = '';
109
        parent::start_el($item_html, $object, $depth, $args);
110
        $classes = empty($object->classes) ? [] : (array) $object->classes;
111
112
        if (in_array('label', $classes)) {
113
114
            $item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html);
115
116
        }
117
118
        $output .= $item_html;
119
    }
120
121
    /**
122
     * @param $output
123
     * @param $depth
124
     * @param array     $args
125
     */
126
    public function start_lvl(&$output, $depth = 0, $args = [])
127
    {
128
        $output .= "\n<ul class=\"left-submenu\">\n<li class=\"back\"><a href=\"#\">" . __('Back', 'podium') . "</a></li>\n";
129
    }
130
131
}
132