Issues (461)

Branch: master

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.

includes/sanitize.php (3 issues)

1
<?php
2
/**
3
 * LSX sanitize callbacks for the customizer options.
4
 *
5
 * @package    lsx
6
 * @subpackage sanitize
7
 */
8
9
if ( ! defined( 'ABSPATH' ) ) {
10
	exit;
11
}
12
13
if ( ! function_exists( 'lsx_sanitize_choices' ) ) :
14
15
	/**
16
	 * Sanitize a value from a list of allowed values.
17
	 *
18
	 * @package    lsx
19
	 * @subpackage sanitize
20
	 *
21
	 * @param mixed $value      The value to sanitize.
22
	 * @param mixed $setting    The setting for which the sanitizing is occurring.
23
	 * @return mixed                The sanitized value.
24
	 */
25
	function lsx_sanitize_choices( $value, $setting ) {
26
		if ( is_object( $setting ) ) {
27
			$setting = $setting->id;
28
		}
29
30
		$choices = lsx_customizer_sanitize_get_choices( $setting );
31
32
		if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
			$allowed_choices = array_keys( $choices );
34
35
			if ( ! in_array( $value, $allowed_choices ) ) {
36
				$value = lsx_customizer_sanitize_get_default( $setting );
37
			}
38
39
			return $value;
40
		} else {
41
			return $choices;
42
		}
43
	}
44
45
endif;
46
47
if ( ! function_exists( 'lsx_customizer_sanitize_get_choices' ) ) :
48
49
	/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$id" missing
Loading history...
50
	 * Helper function to return the choices for a field.
51
	 *
52
	 * @package    lsx
53
	 * @subpackage sanitize
54
	 *
55
	 * @param string
56
	 * @return mixed $field
57
	 */
58
	function lsx_customizer_sanitize_get_choices( $id ) {
59
		global $lsx_customizer;
60
61
		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
62
		$field        = $lsx_customizer->get_control( $id );
63
64
		if ( ! isset( $field['choices'] ) ) {
65
			return $can_validate ? new WP_Error( 'notexists', esc_html__( 'Choice doesn\'t exist', 'lsx' ) ) : false;
66
		}
67
68
		return $field['choices'];
69
	}
70
71
endif;
72
73
if ( ! function_exists( 'lsx_customizer_sanitize_get_default' ) ) :
74
75
	/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$id" missing
Loading history...
76
	 * Helper function to return defaults.
77
	 *
78
	 * @package    lsx
79
	 * @subpackage sanitize
80
	 *
81
	 * @param string
82
	 * @return mixed $default
83
	 */
84
	function lsx_customizer_sanitize_get_default( $id ) {
85
		global $lsx_customizer;
86
		$setting = $lsx_customizer->get_setting( $id );
87
88
		if ( isset( $setting['default'] ) ) {
89
			return $setting['default'];
90
		}
91
92
		return false;
93
	}
94
95
endif;
96
97
if ( ! function_exists( 'lsx_sanitize_checkbox' ) ) :
98
99
	/**
100
	 * Sanitizes an single or multiple checkbox input.
101
	 *
102
	 * @package    lsx
103
	 * @subpackage sanitize
104
	 *
105
	 * @param array $input
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
106
	 * @return array $output
107
	 */
108
	function lsx_sanitize_checkbox( $input ) {
109
		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
110
111
		if ( ! is_bool( $input ) ) {
112
			return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
113
		}
114
115
		return $input;
116
	}
117
118
endif;
119