Issues (23)

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.

includes/admin/class-gmb-settings.php (2 issues)

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
/**
4
 * Class Google_Maps_Builder_Settings
5
 */
6
class Google_Maps_Builder_Settings extends Google_Maps_Builder_Core_Settings {
7
8
	/**
9
	 * Option key, and option page slug.
10
	 * @var string
11
	 */
12
	protected static $key = 'gmb_settings';
13
14
15
	/**
16
	 * Constructor
17
	 * @since 0.1.0
18
	 */
19
	public function __construct() {
20
		parent::__construct();
21
		$this->page_name = __( 'Google Maps Builder Settings', 'google-maps-builder' );
22
23
		add_action( 'cmb2_render_lat_lng_default', array( $this, 'cmb2_render_lat_lng_default' ), 10, 2 );
24
25
		//upsell markup
26
		add_action( 'gmb_settings_page_after_logo', array( $this, 'settings_upsell' ) );
27
		add_action( 'gmb_social_media_after_logo', array( $this, 'settings_social_media_upsell' ) );
28
	}
29
30
31
	/**
32
	 * Add links to Plugin listings view
33
	 *
34
	 * @param $links
35
	 *
36
	 * @return mixed
37
	 */
38
	function add_plugin_page_links( $links, $file ) {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
39
40
		if ( $file == GMB_PLUGIN_BASE ) {
41
42
			// Add Widget Page link to our plugin
43
			$settings_link = '<a href="edit.php?post_type=google_maps&page=' . self::$key . '" title="' . __( 'Visit the Google Maps Builder plugin settings page', 'google-maps-builder' ) . '">' . __( 'Settings', 'google-maps-builder' ) . '</a>';
44
			array_unshift( $links, $settings_link );
45
		}
46
47
		return $links;
48
	}
49
50
	/**
51
	 * Add Plugin Meta Links
52
	 *
53
	 * @description: Adds links to the plugin listing page in wp-admin
54
	 *
55
	 * @param $meta
56
	 * @param $file
57
	 *
58
	 * @return array
59
	 */
60
	function add_plugin_meta_links( $meta, $file ) {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
61
62
		if ( $file == GMB_PLUGIN_BASE ) {
63
			$meta[] = "<a href='http://wordpress.org/support/view/plugin-reviews/google-maps-builder' target='_blank' title='" . __( 'Rate Google Maps Builder on WordPress.org', 'google-maps-builder' ) . "'>" . __( 'Rate Plugin', 'google-maps-builder' ) . "</a>";
64
			$meta[] = "<a href='https://wordimpress.com/documentation/maps-builder-pro/' target='_blank' title='" . __( 'View the plugin documentation', 'google-maps-builder' ) . "'>" . __( 'Documentation', 'google-maps-builder' ) . "</a>";
65
			$meta[] = '<a href="http://wordpress.org/support/plugin/google-maps-builder/" target="_blank" title="' . __( 'Get plugin support via the WordPress community', 'google-maps-builder' ) . '">' . __( 'Support', 'google-maps-builder' ) . '</a>';
66
			$meta[] = '<a href="
67
https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&utm_medium=BANNER&utm_content=LISTING&utm_campaign=MBF%20LISTING" title="' . __( 'Upgrade to Maps Builder Pro', 'google-maps-builder' ) . '" target="_blank">' . __( 'Upgrade to Pro', 'google-maps-builder' ) . ' &raquo;</a>';
68
		}
69
70
		return $meta;
71
	}
72
73
	/**
74
	 * Add upsell in settings page
75
	 *
76
	 * @since 2.1.0
77
	 *
78
	 * @uses "gmb_settings_page_after_logo" action
79
	 */
80
	public function settings_upsell() { ?>
81
		<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&utm_medium=BANNER&utm_content=SETTINGS&utm_campaign=MBF%20Settings" target="_blank" class="button gmb-settings-header-btn">
82
			<?php _e( 'Upgrade to Pro', 'google-maps-builder' ); ?>
83
		</a>
84
		<?php
85
	}
86
87
	/**
88
	 * Add upsell in social media section.
89
	 *
90
	 * @since 2.1.0
91
	 *
92
	 * @uses "gmb_social_media_after_logo" action
93
	 */
94
	public function settings_social_media_upsell() {
95
		?>
96
		<div class="go-pro">
97
			<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&amp;utm_medium=BANNER&amp;utm_content=SETTINGS&amp;utm_campaign=MBF%20Settings" target="_blank" class="button button-primary button-small gmb-settings-header-btn">
98
				<?php esc_html_e( 'Upgrade to Pro', 'google-maps-builder' ); ?>
99
			</a>
100
		</div>
101
		<?php
102
	}
103
104
	/**
105
	 * Handle main data for the settings page
106
	 *
107
	 * @since 2.1.0
108
	 *
109
	 * @return array
110
	 */
111
	protected function settings_page_data() {
112
		//place holder
113
		$data = array(
114
			'welcome'     => sprintf( '%1s Maps Builder %s', __( 'Welcome to', 'maps-builder-pro' ), Google_Maps_Builder()->meta['Version'] ),
115
			'sub_heading' => $this->sub_heading()
116
		);
117
118
		return $this->view_data( $data, true );
119
	}
120
121
	/**
122
	 * Sub heading markup for settings page
123
	 *
124
	 * @since 2.1.0
125
	 *
126
	 * @return string
127
	 */
128
	protected function sub_heading() {
129
		$out = __( 'Thanks for using Maps Builder. ', 'google-maps-pro' );
130
		$out .= sprintf( __( 'To get started, read over the %1$sdocumentation%2$s, take a gander at the settings, and build yourself some maps! If you enjoy this plugin please consider telling a friend, rating it %3$s5-stars%2$s, or purchasing the %4$sPro%2$s edition.', 'google-maps-builder' ), '<a href="https://wordimpress.com/documentation/maps-builder-pro/" target="_blank">', '</a>', '<a href="https://wordpress.org/support/view/plugin-reviews/google-maps-builder?filter=5#postform" target="_blank">', '<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&amp;utm_medium=BANNER&amp;utm_content=SETTINGS&amp;utm_campaign=MBF%20Settings" target="_blank">' );
131
132
		return $out;
133
134
	}
135
136
137
}
138
139