Issues (15)

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.

includes/admin/class-alnp-extensions.php (2 issues)

Labels
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
 * Auto Load Next Post Extensions class
4
 *
5
 * Displays Extensions available for Auto Load Next Post hosted via WordPress.org
6
 *
7
 * @since    1.6.0
8
 * @author   Sébastien Dumont
9
 * @category Classes
10
 * @package  Auto Load Next Post/Classes/Extensions
11
 * @license  GPL-2.0+
12
 */
13
14
// Exit if accessed directly.
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
if ( ! class_exists( 'ALNP_Extensions' ) ) {
20
21
	class ALNP_Extensions {
22
23
		/**
24
		 * Extensions Var
25
		 * 
26
		 * @access public
27
		 * @static
28
		 */
29
		public static $extensions;
30
31
		/**
32
		 * Initialize Extensions.
33
		 *
34
		 * @access public
35
		 */
36
		public function __construct() {
37
			$this->id    = 'extensions';
0 ignored issues
show
The property id does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
38
			$this->label = esc_html__( 'Extensions', 'auto-load-next-post' );
0 ignored issues
show
The property label does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
39
40
			// Below are extensions hosted on WordPress.org
41
			self::$extensions = array(
42
				array(
43
					'slug' => 'alnp-facebook-pixel-tracking', // Facebook Pixel Tracking
44
				),
45
			);
46
47
			include_once( AUTO_LOAD_NEXT_POST_FILE_PATH . '/vendor/connekt-plugin-installer/class-connekt-plugin-installer.php'); // Plugin Installer
48
49
			add_filter( 'alnp_settings_tabs_array', array( $this, 'add_extensions_page' ), 99 );
50
			add_action( 'auto_load_next_post_settings_end', array( $this, 'output' ), 10, 2 );
51
		} // END __construct()
52
53
		/**
54
		 * Add the extensions page to the settings.
55
		 *
56
		 * @access public
57
		 * @param  array $pages
58
		 * @return array $pages
59
		 */
60
		public function add_extensions_page( $pages ) {
61
			$pages[$this->id] = $this->label;
62
63
			return $pages;
64
		} // END add_extensions_page()
65
66
		/**
67
		 * Output the extensions.
68
		 * 
69
		 * @access public
70
		 * @param  string $current_view
71
		 * @param  array  $tabs
72
		 */
73
		public function output( $current_view, $tabs ) {
74
			if ( $current_view !== 'extensions' ) {
75
				return;
76
			}
77
			?>
78
			<div class="wrap auto-load-next-post">
79
				<?php
80
				// Include settings tabs.
81
				include_once( dirname( __FILE__ ) . '/views/html-admin-tabs.php' );
82
				?>
83
				<h1 class="screen-reader-text"><?php echo esc_html( $this->label ); ?></h1>
84
85
				<?php
86
				// Load the class if it exists and Airplane Mode is disabled.
87
				if ( class_exists( 'Connekt_Plugin_Installer' ) && ! alnp_airplane_mode_enabled() ) {
88
					Connekt_Plugin_Installer::init( self::$extensions );
89
				}
90
				?>
91
			</div>
92
			<?php
93
		} // END output()
94
95
	} // END class
96
97
} // END if class
98
99
return new ALNP_Extensions();