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/welcome.php (2 issues)

Labels
Severity
1
<?php
2
/**
3
 * LSX functions and definitions - Welcome page.
4
 *
5
 * @package    lsx
6
 * @subpackage welcome-page
7
 */
8
9
if ( ! defined( 'ABSPATH' ) ) {
10
	exit;
11
}
12
13
if ( ! function_exists( 'lsx_activation_admin_notice_dismiss' ) ) :
14
15
	/**
16
	 * Dismiss the admin notice (successful activation).
17
	 *
18
	 * @package    lsx
19
	 * @subpackage welcome-page
20
	 */
21
	function lsx_activation_admin_notice_dismiss() {
22
		update_option( 'lsx-notice-dismissed', '1' );
23
		wp_die();
24
	}
25
26
endif;
27
28
add_action( 'wp_ajax_lsx_dismiss_theme_notice', 'lsx_activation_admin_notice_dismiss' );
29
30
if ( ! function_exists( 'lsx_activation_admin_notice' ) ) :
31
32
	/**
33
	 * Adds an admin notice upon successful activation.
34
	 *
35
	 * @package    lsx
36
	 * @subpackage welcome-page
37
	 */
38
	function lsx_activation_admin_notice() {
39
		if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) {
40
			add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 );
41
		}
42
	}
43
44
endif;
45
46
add_action( 'admin_notices', 'lsx_activation_admin_notice' );
47
48
if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) :
49
50
	/**
51
	 * Display an admin notice linking to the welcome screen.
52
	 *
53
	 * @package    lsx
54
	 * @subpackage welcome-page
55
	 */
56
	function lsx_welcome_admin_notice() {
57
		?>
58
			<div class="lsx-theme-notice notice notice-success is-dismissible">
59
				<p>
60
					<?php
61
						printf(
62
							/* Translators: 1: HTML open tag link, 2: HTML close tag link */
63
							esc_html_e( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ),
0 ignored issues
show
Are you sure the usage of esc_html_e('Thanks for c...me screen%2$s.', 'lsx') is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
esc_html_e('Thanks for c...me screen%2$s.', 'lsx') of type null is incompatible with the type string expected by parameter $format of printf(). ( Ignorable by Annotation )

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

63
							/** @scrutinizer ignore-type */ esc_html_e( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ),
Loading history...
64
							'<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">',
65
							'</a>'
66
						);
67
					?>
68
				</p>
69
				<p><a href="<?php echo esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ); ?>" class="button" style="text-decoration: none;"><?php esc_html_e( 'Get started with LSX', 'lsx' ); ?></a></p>
70
			</div>
71
		<?php
72
	}
73
74
endif;
75
76
if ( ! function_exists( 'lsx_welcome_style' ) ) :
77
78
	/**
79
	 * Load welcome screen css.
80
	 *
81
	 * @package    lsx
82
	 * @subpackage welcome-page
83
	 *
84
	 * @param string $hook_suffix the current page hook suffix.
85
	 */
86
	function lsx_welcome_style( $hook_suffix ) {
87
		if ( 'appearance_page_lsx-welcome' === $hook_suffix ) {
88
			wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION );
89
			wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION );
90
			wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' );
91
		}
92
	}
93
94
endif;
95
96
add_action( 'admin_enqueue_scripts', 'lsx_welcome_style' );
97
98
if ( ! function_exists( 'lsx_welcome_register_menu' ) ) :
99
100
	/**
101
	 * Creates the dashboard page.
102
	 *
103
	 * @package    lsx
104
	 * @subpackage welcome-page
105
	 */
106
	function lsx_welcome_register_menu() {
107
		add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' );
108
	}
109
110
endif;
111
112
add_action( 'admin_menu', 'lsx_welcome_register_menu' );
113
114
if ( ! function_exists( 'lsx_welcome_screen' ) ) :
115
116
	/**
117
	 * The welcome screen.
118
	 *
119
	 * @package    lsx
120
	 * @subpackage welcome-page
121
	 */
122
	function lsx_welcome_screen() {
123
		require_once ABSPATH . 'wp-load.php';
124
		require_once ABSPATH . 'wp-admin/admin.php';
125
		require_once ABSPATH . 'wp-admin/admin-header.php';
126
		?>
127
		<div class="wrap about-wrap">
128
			<?php
129
			/**
130
			 * Functions hooked into lsx_welcome action
131
			 *
132
			 * @hooked lsx_welcome_header  - 10
133
			 * @hooked lsx_welcome_enhance - 20
134
			 * @hooked lsx_welcome_footer  - 30
135
			 */
136
			do_action( 'lsx_welcome' );
137
			?>
138
		</div>
139
		<?php
140
	}
141
142
endif;
143
144
if ( ! function_exists( 'lsx_welcome_header' ) ) :
145
146
	/**
147
	 * Welcome screen intro.
148
	 *
149
	 * @package    lsx
150
	 * @subpackage welcome-page
151
	 */
152
	function lsx_welcome_header() {
153
		require_once get_template_directory() . '/includes/admin/welcome-screen/component-header.php';
154
	}
155
156
endif;
157
158
add_action( 'lsx_welcome', 'lsx_welcome_header', 10 );
159
160
if ( ! function_exists( 'lsx_welcome_enhance' ) ) :
161
162
	/**
163
	 * Welcome screen enhance section.
164
	 *
165
	 * @package    lsx
166
	 * @subpackage welcome-page
167
	 */
168
	function lsx_welcome_enhance() {
169
		require_once get_template_directory() . '/includes/admin/welcome-screen/component-enhance.php';
170
	}
171
172
endif;
173
174
add_action( 'lsx_welcome', 'lsx_welcome_enhance', 20 );
175
176
if ( ! function_exists( 'lsx_welcome_footer' ) ) :
177
178
	/**
179
	 * Welcome screen contribute section.
180
	 *
181
	 * @package    lsx
182
	 * @subpackage welcome-page
183
	 */
184
	function lsx_welcome_footer() {
185
		require_once get_template_directory() . '/includes/admin/welcome-screen/component-footer.php';
186
	}
187
188
endif;
189
190
add_action( 'lsx_welcome', 'lsx_welcome_footer', 30 );
191