GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (1)

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.

classes/class-widget.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
//avoid direct calls to this file
3
if ( ! defined( 'ABSPATH' ) ) {
4
	header( 'Status: 403 Forbidden' );
5
	header( 'HTTP/1.1 403 Forbidden' );
6
	exit();
7
}
8
9
/**
10
 * Adds WP_Editor_Widget widget.
11
 */
12
class WP_Editor_Widget extends WP_Widget {
13
14
	/**
15
	 * Register widget with WordPress.
16
	 */
17
	public function __construct() {
18
		
19
		// WPML support?
20
		if ( function_exists( 'icl_get_languages' ) ) {
21
			$widget_name = esc_html__( 'Multilingual', 'wp-editor-widget' ) . ' ' . esc_html__( 'Rich text', 'wp-editor-widget' );
22
		}
23
		else {
24
			$widget_name = esc_html__( 'Rich text', 'wp-editor-widget' );
25
		}
26
27
		$widget_ops = apply_filters(
28
			'wp_editor_widget_ops',
29
			array(
30
				'classname' 	=> 'WP_Editor_Widget',
31
				'description' 	=> __( 'Arbitrary text, HTML or rich text through the standard WordPress visual editor.', 'wp-editor-widget' ),
32
			)
33
		);
34
		
35
		parent::__construct(
36
			'WP_Editor_Widget',
37
			$widget_name,
38
			$widget_ops
39
		);
40
41
	} // END __construct()
42
43
	/**
44
	 * Front-end display of widget.
45
	 *
46
	 * @see WP_Widget::widget()
47
	 *
48
	 * @param array $args Widget arguments.
49
	 * @param array $instance Saved values from database.
50
	 */
51
	public function widget( $args, $instance ) {
52
53
		$title			= apply_filters( 'wp_editor_widget_title', $instance['title'] );
54
		$output_title	= apply_filters( 'wp_editor_widget_output_title', $instance['output_title'] );
55
		$content		= apply_filters( 'wp_editor_widget_content', $instance['content'] );
56
		
57
		$show = true;
58
		
59
		// WPML support?
60
		if ( function_exists( 'icl_get_languages' ) ) {
61
			$language = apply_filters( 'wp_editor_widget_language', $instance['language'] );
62
			$show = ($language == icl_get_current_language());
63
		}
64
		
65
		if ( $show ) {
66
	
67
			$default_html = $args['before_widget'];
68
	
69
			if ( '1' == $output_title && ! empty( $title ) ) {
70
				$default_html .= $args['before_title'] . $title . $args['after_title'];
71
			}
72
	
73
			$default_html .= $content;
74
	
75
			$default_html .= $args['after_widget'];
76
			
77
			echo apply_filters( 'wp_editor_widget_html', $default_html, $args['id'], $instance, $args['before_widget'], $args['after_widget'], $output_title, $title, $args['before_title'], $args['after_title'], $content );
0 ignored issues
show
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw 'apply_filters'
Loading history...
78
			
79
		}
80
81
	} // END widget()
82
83
	/**
84
	 * Back-end widget form.
85
	 *
86
	 * @see WP_Widget::form()
87
	 *
88
	 * @param array $instance Previously saved values from database.
89
	 */
90
	public function form( $instance ) {
91
92
		if ( isset( $instance['title'] ) ) {
93
			$title = $instance['title'];
94
		}
95
		else {
96
			$title = __( 'New title', 'wp-editor-widget' );
97
		}
98
99
		if ( isset( $instance['content'] ) ) {
100
			$content = $instance['content'];
101
		}
102
		else {
103
			$content = '';
104
		}
105
106
		$output_title = ( isset( $instance['output_title'] ) && '1' == $instance['output_title'] ? true : false );
107
		?>
108
		<input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" value="<?php echo esc_attr( $content ); ?>">
109
		<p>
110
			<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'wp-editor-widget' ); ?>:</label>
111
			<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
112
		</p>
113
		<p>
114
			<a href="javascript:WPEditorWidget.showEditor('<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>');" class="button"><?php _e( 'Edit content', 'wp-editor-widget' ) ?></a>
115
		</p>
116
		<p>
117
			<label for="<?php echo esc_attr( $this->get_field_id( 'output_title' ) ); ?>">
118
				<input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'output_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'output_title' ) ); ?>" value="1" <?php checked( $output_title, true ) ?>> <?php _e( 'Output title', 'wp-editor-widget' ); ?>
119
			</label>
120
		</p>
121
		<?php if ( function_exists( 'icl_get_languages' ) ) : $languages = icl_get_languages( 'skip_missing=0&orderby=code' ); ?>
122
			<label for="<?php echo esc_attr( $this->get_field_id( 'language' ) ); ?>">
123
				<?php _e( 'Language', 'wp-editor-widget' ); ?>:
124
				<select id="<?php echo esc_attr( $this->get_field_id( 'language' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'language' ) ); ?>">
125
					<?php foreach ( $languages as $id => $lang ) : ?>
126
						<option value="<?php echo esc_attr( $lang['language_code'] ) ?>" <?php selected( $instance['language'], $lang['language_code'] ) ?>><?php echo esc_attr( $lang['native_name'] ) ?></option>
127
					<?php endforeach; ?>
128
				</select>
129
			</label>
130
		<?php endif; ?>
131
		<?php
132
			
133
		do_action( 'wp_editor_widget_form', $this, $instance );
134
135
	} // END form()
136
137
	/**
138
	 * Sanitize widget form values as they are saved.
139
	 *
140
	 * @see WP_Widget::update()
141
	 *
142
	 * @param array $new_instance Values just sent to be saved.
143
	 * @param array $old_instance Previously saved values from database.
144
	 *
145
	 * @return array Updated safe values to be saved.
146
	 */
147
	public function update( $new_instance, $old_instance ) {
148
149
		$instance = array();
150
151
		$instance['title']			= ( ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '' );
152
		$instance['content']		= ( ! empty( $new_instance['content'] ) ? $new_instance['content'] : '' );
153
		$instance['output_title']	= ( isset( $new_instance['output_title'] ) && '1' == $new_instance['output_title'] ? 1 : 0 );
154
		
155
		// WPML support
156
		if ( function_exists( 'icl_get_languages' )  ) {
157
			$instance['language']   = ( isset( $new_instance['language'] ) ? $new_instance['language'] : '');
158
		}
159
160
		do_action( 'wp_editor_widget_update', $new_instance, $instance );
161
162
 	 	return apply_filters( 'wp_editor_widget_update_instance', $instance, $new_instance );
163
164
	} // END update()
165
166
} // END class WP_Editor_Widget
167