Issues (234)

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/pages/advanced.php (1 issue)

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
 * General Settings Page
4
 *
5
 * @package SimpleCalendar/Admin
6
 */
7
namespace SimpleCalendar\Admin\Pages;
8
9
use SimpleCalendar\Abstracts\Admin_Page;
10
11
if ( ! defined( 'ABSPATH' ) ) {
12
	exit;
13
}
14
15
/**
16
 * General settings.
17
 *
18
 * Handles the plugin general settings and outputs the markup the settings page.
19
 *
20
 * @since 3.0.0
21
 */
22
class Advanced extends Admin_Page {
23
24
	/**
25
	 * Constructor.
26
	 *
27
	 * @since 3.0.0
28
	 */
29
	public function __construct() {
30
		$this->id           = 'advanced';
31
		$this->option_group = 'settings';
32
		$this->label        = __( 'Advanced', 'google-calendar-events' );
33
		//$this->description  = __( 'Advanced settings.', 'google-calendar-events' );
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
34
		$this->sections     = $this->add_sections();
35
		$this->fields       = $this->add_fields();
36
	}
37
38
	/**
39
	 * Add sections.
40
	 *
41
	 * @since  3.0.0
42
	 *
43
	 * @return array
44
	 */
45
	public function add_sections() {
46
		return apply_filters( 'simcal_add_' . $this->option_group . '_' . $this->id .'_sections', array(
47
			'assets' => array(
48
				'title'       => __( 'Styles', 'google-calendar-events' ),
49
				'description' => __( 'Manage front end assets that handle the calendars appearance.', 'google-calendar-events' )
50
			),
51
			'installation' => array(
52
				'title'       => __( 'Installation', 'google-calendar-events' ),
53
				'description' => __( 'Manage your data (plugin settings and saved calendars).', 'google-calendar-events' )
54
			)
55
		) );
56
	}
57
58
	/**
59
	 * Add fields.
60
	 *
61
	 * @since  3.0.0
62
	 *
63
	 * @return array
64
	 */
65
	public function add_fields() {
66
67
		$fields       = array();
68
		$this->values = get_option( 'simple-calendar_' . $this->option_group . '_' . $this->id );
69
70
		foreach ( $this->sections  as $section => $a ) :
71
72
			if ( 'assets' == $section ) {
73
74
				$fields[ $section ] = array(
75
					'disable_css' => array(
76
						'title'   => __( 'Disable CSS', 'google-calendar-events' ),
77
						'tooltip' => __( 'If ticked, this option will prevent all front end stylesheets to load. This also includes all add-on stylesheets.', 'google-calendar-events' ),
78
						'type'    => 'checkbox',
79
						'name'    => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][disable_css]',
80
						'id'      => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-disable-css',
81
						'value'   => $this->get_option_value( $section, 'disable_css' )
82
					),
83
				);
84
85
			} elseif ( 'installation' == $section ) {
86
87
				$fields[ $section ] = array(
88
					'delete_settings' => array(
89
						'title'   => __( 'Delete settings', 'google-calendar-events' ),
90
						'tooltip' => __( 'Tick this option if you want to wipe this plugin settings from database when uninstalling.', 'google-calendar-events' ),
91
						'type'    => 'checkbox',
92
						'name'    => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][delete_settings]',
93
						'id'      => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-delete-settings',
94
						'value'   => $this->get_option_value( $section, 'delete_settings' ),
95
					),
96
					'erase_data' => array(
97
						'title'   => __( 'Erase calendar data', 'google-calendar-events' ),
98
						'tooltip' => __( 'By default your data will be retained in database even after uninstall. Tick this option if you want to delete all your calendar data when uninstalling.', 'google-calendar-events' ),
99
						'type'    => 'checkbox',
100
						'name'    => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][erase_data]',
101
						'id'      => 'simple-calendar_' . $this->option_group . '_' . $this->id . '-delete-data',
102
						'value'   => $this->get_option_value( $section, 'erase_data' ),
103
					)
104
				);
105
106
			}
107
108
		endforeach;
109
110
		return apply_filters( 'simcal_add_' . $this->option_group . '_' . $this->id . '_fields', $fields );
111
	}
112
113
}
114