Issues (1282)

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/class-give-donor-wall-widget.php (2 issues)

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
 * Donors Gravatars
4
 *
5
 * @package     Give
6
 * @subpackage  Classes/Give_Donors_Gravatars
7
 * @copyright   Copyright (c) 2016, GiveWP
8
 * @license     https://opensource.org/licenses/gpl-license GNU Public License
9
 * @since       1.0
10
 */
11
12
// Exit if accessed directly.
13
if ( ! defined( 'ABSPATH' ) ) {
14
	exit;
15
}
16
17
/**
18
 * Give_Donor_Wall_Widget Class
19
 *
20
 * This class handles donors gravatars
21
 *
22
 * @since 1.0
23
 */
24
class Give_Donor_Wall_Widget extends WP_Widget {
25
26
	/**
27
	 * Widget constructor
28
	 *
29
	 * @since  1.0
30
	 * @access public
31
	 */
32
	public function __construct() {
33
34
		// widget settings
35
		$widget_ops = array(
36
			'classname'   => 'give-donors-gravatars',
37
			'description' => esc_html__( 'Displays gravatars of people who have donated using your your form. Will only show on the single form page.', 'give' ),
38
		);
39
40
		// widget control settings
41
		$control_ops = array(
42
			'width'   => 250,
43
			'height'  => 350,
44
			'id_base' => 'give_gravatars_widget'
45
		);
46
47
		// create the widget
48
		parent::__construct(
49
			'give_donors_gravatars_widget',
50
			esc_html__( 'Give Donors Gravatars', 'give' ),
51
			$widget_ops,
52
			$control_ops
53
		);
54
55
	}
56
57
	/**
58
	 * Donors gravatars widget content
59
	 *
60
	 * Outputs the content of the widget
61
	 *
62
	 * @since  1.0
63
	 * @access public
64
	 *
65
	 * @param  array $args     Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'.
66
	 * @param  array $instance Settings for the current Links widget instance.
67
	 *
68
	 * @return void
69
	 */
70
	public function widget( $args, $instance ) {
71
72
		//@TODO: Don't extract it!!!
73
		extract( $args );
74
75
		if ( ! is_singular( 'give_forms' ) ) {
76
			return;
77
		}
78
79
		// Variables from widget settings
80
		$title = apply_filters( 'widget_title', $instance['title'] );
81
82
		// Used by themes. Opens the widget
83
		echo $before_widget;
84
85
		// Display the widget title
86
		if ( $title ) {
87
			echo $before_title . $title . $after_title;
88
		}
89
90
		echo Give_Donor_Wall::get_instance()->gravatars( get_the_ID(), null ); // remove title
0 ignored issues
show
The method gravatars() does not seem to exist on object<Give_Donor_Wall>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
91
92
		// Used by themes. Closes the widget
93
		echo $after_widget;
94
95
	}
96
97
	/**
98
	 * Update donors gravatars
99
	 *
100
	 * Processes widget options to be saved.
101
	 *
102
	 * @since  1.0
103
	 * @access public
104
	 *
105
	 * @param  array $new_instance New settings for this instance as input by the user via WP_Widget::form().
106
	 * @param  array $old_instance Old settings for this instance.
107
	 *
108
	 * @return array Updated settings to save.
109
	 */
110
	public function update( $new_instance, $old_instance ) {
111
112
		$instance = $old_instance;
113
114
		$instance['title'] = strip_tags( $new_instance['title'] );
115
116
		return $instance;
117
118
	}
119
120
	/**
121
	 * Output donors
122
	 *
123
	 * Displays the actual form on the widget page.
124
	 *
125
	 * @since  1.0
126
	 * @access public
127
	 *
128
	 * @param  array $instance Current settings.
129
	 *
130
	 * @return void
131
	 */
132
	public function form( $instance ) {
133
134
		// Set up some default widget settings.
135
		$defaults = array(
136
			'title' => '',
137
		);
138
139
		$instance = wp_parse_args( (array) $instance, $defaults ); ?>
140
141
		<!-- Title -->
142
		<p>
143
			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'give' ) ?></label>
144
			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $instance['title']; ?>" />
145
		</p>
146
147
		<?php
148
	}
149
150
	/**
151
	 * Register the widget
152
	 *
153
	 * @return void
154
	 */
155
	function widget_init(){
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...
156
		register_widget( $this->self );
157
	}
158
159
}
160
161
162
163