Issues (865)

Security Analysis    4 potential vulnerabilities

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection (1)
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection (2)
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  Cross-Site Scripting (1)
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.
  Header Injection
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.

widgets/checkout.php (1 issue)

1
<?php
2
if ( ! defined( 'ABSPATH' ) ) {
3
    exit;
4
}
5
6
/**
7
 * Invoicing checkout form widget.
8
 *
9
 */
10
class WPInv_Checkout_Widget extends WP_Super_Duper {
11
12
	/**
13
	 * Register the widget with WordPress.
14
	 *
15
	 */
16
	public function __construct() {
17
18
		$options = array(
19
			'textdomain'     => 'invoicing',
20
			'block-icon'     => 'admin-site',
21
			'block-category' => 'widgets',
22
			'block-keywords' => "['invoicing','checkout']",
23
			'class_name'     => __CLASS__,
24
			'base_id'        => 'wpinv_checkout',
25
			'name'           => __( 'GetPaid > Checkout', 'invoicing' ),
26
			'widget_ops'     => array(
27
				'classname'   => 'getpaid-checkout bsui',
28
				'description' => esc_html__( 'Displays a checkout form.', 'invoicing' ),
29
			),
30
			'arguments'      => array(
31
				'title' => array(
32
					'title'    => __( 'Widget title', 'invoicing' ),
33
					'desc'     => __( 'Enter widget title.', 'invoicing' ),
34
					'type'     => 'text',
35
					'desc_tip' => true,
36
					'default'  => '',
37
					'advanced' => false,
38
				),
39
			),
40
41
		);
42
43
		parent::__construct( $options );
44
	}
45
46
	/**
47
	 * The Super block output function.
48
	 *
49
	 * @param array $args
50
	 * @param array $widget_args
51
	 * @param string $content
52
	 *
53
	 * @return mixed|string|bool
54
	 */
55
	public function output( $args = array(), $widget_args = array(), $content = '' ) {
56
		if ( $this->is_preview() ) {
57
			return $this->get_dummy_preview( $args );
58
		}
59
60
		return wpinv_checkout_form();
61
	}
62
63
	public function get_dummy_preview( $args ) {
0 ignored issues
show
The parameter $args is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

63
	public function get_dummy_preview( /** @scrutinizer ignore-unused */ $args ) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
64
		$output = '<form><div class="col-12">';
65
66
		$output .= aui()->alert(
67
			array(
68
				'type'=> 'info',
69
				'content' => __( 'This is a simple preview for a checkout form.', 'invoicing' )
70
			)
71
		);
72
73
		$output .= aui()->input(
74
			array(
75
				'name'        => 'mmdwqzpox',
76
				'required'    => true,
77
				'label'       => __( 'Billing Email', 'invoicing' ),
78
				'label_type'  => 'vertical',
79
				'type'        => 'text',
80
				'placeholder' => '[email protected]',
81
				'class'       => '',
82
				'value'       => ''
83
			)
84
		);
85
86
		$output .= aui()->input(
87
			array(
88
				'name'        => 'mmdwqzpoy',
89
				'required'    => true,
90
				'label'       => __( 'First Name', 'invoicing' ),
91
				'label_type'  => 'vertical',
92
				'type'        => 'text',
93
				'placeholder' => 'Jon',
94
				'class'       => '',
95
				'value'       => ''
96
			)
97
		);
98
99
		$output .= aui()->input(
100
			array(
101
				'name'        => 'mmdwqzpoz',
102
				'required'    => true,
103
				'label'       => __( 'Last Name', 'invoicing' ),
104
				'label_type'  => 'vertical',
105
				'type'        => 'text',
106
				'placeholder' => 'Snow',
107
				'class'       => '',
108
				'value'       => ''
109
			)
110
		);
111
112
		$output .= aui()->button(
113
			array(
114
				'type'        => 'button',
115
				'class'       => 'btn btn-primary w-100',
116
				'content'     => __( 'Pay Now ยป', 'invoicing' ),
117
				'description' => __( 'By continuing with your payment, you are agreeing to our privacy policy and terms of service.', 'invoicing' )
118
			)
119
		);
120
121
		$output .= '</div></form>';
122
123
		return $output;
124
	}
125
}
126