Issues (850)

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.

includes/admin/views/wizard-settings.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Displays the set-up wizard bussiness settings.
4
 *
5
 */
6
7
defined( 'ABSPATH' ) || exit;
8
9
global $aui_bs5;
10
?>
11
<div class="card shadow-sm my-5">
12
    <form method="post" class="<?php echo( $aui_bs5 ? 'text-start' : 'text-left' ); ?> card-body" action="options.php">
13
        <?php settings_fields( 'wpinv_settings' ); ?>
14
        <input type="hidden" name="_wp_http_referer" value="<?php echo esc_url( $next_url ); ?>">
15
16
        <table class="gp-setup-maps w-100 " cellspacing="0">
17
            <tbody>
18
                <?php
19
20
                    global $wp_settings_fields;
21
22
                    if ( isset( $wp_settings_fields[ $page ][ $section ] ) ) {
23
					$settings = $wp_settings_fields[ $page ][ $section ];
24
25
					foreach ( $settings as $field ) {
26
27
						$name      = esc_attr( $field['id'] );
28
						$id        = sanitize_key( $name );
29
						$class     = '';
30
						$value     = isset( $field['args']['std'] ) ? $field['args']['std'] : '';
31
						$value     = wpinv_clean( wpinv_get_option( $field['args']['id'], $value ) );
32
						$help_text = isset( $field['args']['desc'] ) ? wp_kses_post( $field['args']['desc'] ) : '';
33
						$type      = str_replace( 'wpinv_', '', str_replace( '_callback', '', $field['callback'] ) );
34
						$label     = isset( $field['args']['name'] ) ? wp_kses_post( $field['args']['name'] ) : '';
35
						$options   = isset( $field['args']['options'] ) ? $field['args']['options'] : array();
36
37
						if ( false !== strpos( $name, 'logo' ) ) {
38
							$type = 'hidden';
39
                            }
40
41
						if ( 'country_states' == $type ) {
42
43
							if ( 0 == count( wpinv_get_country_states( wpinv_get_default_country() ) ) ) {
44
								$type = 'text';
45
                                } else {
46
								$type = 'select';
47
                                }
48
49
							$class = 'getpaid_js_field-state';
50
                            }
51
52
						if ( 'wpinv_settings[default_country]' == $name ) {
53
							$class = 'getpaid_js_field-country';
54
                            }
55
56
						switch ( $type ) {
57
58
							case 'hidden':
59
								echo "<input type='hidden' id='" . esc_attr( $id ) . "' name='" . esc_attr( $name ) . "' value='" . esc_attr( $value ) . "' />";
0 ignored issues
show
It seems like $value can also be of type array; however, parameter $text of esc_attr() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

59
								echo "<input type='hidden' id='" . esc_attr( $id ) . "' name='" . esc_attr( $name ) . "' value='" . esc_attr( /** @scrutinizer ignore-type */ $value ) . "' />";
Loading history...
60
								break;
61
							case 'text':
62
                            case 'number':
63
								aui()->input(
64
                                    array(
65
								'type'        => $type,
66
								'id'          => $id,
67
								'name'        => $name,
68
								'value'       => is_scalar( $value ) ? esc_attr( $value ) : '',
69
								'required'    => false,
70
								'help_text'   => $help_text,
71
								'label'       => $label,
72
								'class'       => $class,
73
								'label_type'  => 'floating',
74
								'label_class' => 'settings-label',
75
                                    ),
76
									true
77
                                );
78
								break;
79
							case 'textarea':
80
								aui()->textarea(
81
									array(
82
										'id'          => $id,
83
										'name'        => $name,
84
										'value'       => is_scalar( $value ) ? esc_textarea( $value ) : '',
85
										'required'    => false,
86
										'help_text'   => $help_text,
87
										'label'       => $label,
88
										'rows'        => '4',
89
										'class'       => $class,
90
										'label_type'  => 'floating',
91
										'label_class' => 'settings-label',
92
									),
93
									true
94
								);
95
96
								break;
97
							case 'select':
98
								aui()->select(
99
									array(
100
										'id'          => $id,
101
										'name'        => $name,
102
										'placeholder' => '',
103
										'value'       => is_scalar( $value ) ? esc_attr( $value ) : '',
104
										'required'    => false,
105
										'help_text'   => $help_text,
106
										'label'       => $label,
107
										'options'     => $options,
108
										'label_type'  => 'floating',
109
										'label_class' => 'settings-label',
110
										'class'       => $class,
111
									),
112
									true
113
								);
114
								break;
115
							default:
116
								// Do something.
117
								break;
118
                            }
119
                        }
120
                    }
121
122
                ?>
123
            </tbody>
124
125
            <p class="gp-setup-actions step text-center mt-4">
126
				<input
127
                    type="submit"
128
                    class="btn btn-primary button-next"
129
				    value="<?php esc_attr_e( 'Continue', 'invoicing' ); ?>" name="save_step"/>
130
			</p>
131
        </table>
132
    </form>
133
134
</div>
135