Issues (1378)

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/acf/pro/admin/views/settings-updates.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
3
// extract
4
extract($args);
5
6
7
// vars
8
$active = $license ? true : false;
9
$nonce = $active ? 'deactivate_pro_licence' : 'activate_pro_licence';
10
$input = $active ? 'password' : 'text';
11
$button = $active ? __('Deactivate License', 'acf') : __('Activate License', 'acf');
12
$readonly = $active ? 1 : 0;
13
14
?>
15
<div class="wrap acf-settings-wrap">
16
	
17
	<h1><?php _e('Updates', 'acf'); ?></h1>
18
	
19
	<div class="acf-box">
20
		<div class="title">
21
			<h3><?php echo acf_get_setting('name'); ?> <?php _e('License','acf') ?></h3>
22
		</div>
23
		<div class="inner">
24
			<p><?php _e("To unlock updates, please enter your license key below. If you don't have a licence key, please see",'acf'); ?> <a href="http://www.advancedcustomfields.com/pro" target="_blank"><?php _e('details & pricing', 'acf'); ?></a></p>
25
			<form action="" method="post">
26
			<div class="acf-hidden">
27
				<input type="hidden" name="_acfnonce" value="<?php echo wp_create_nonce( $nonce ); ?>" />
28
			</div>
29
			<table class="form-table">
30
                <tbody>
31
                	<tr>
32
                    	<th>
33
                    		<label for="acf-field-acf_pro_licence"><?php _e('License Key', 'acf'); ?></label>
34
                    	</th>
35
						<td>
36
							<?php 
37
							
38
							// render field
39
							acf_render_field(array(
0 ignored issues
show
array('type' => $input, ...readonly' => $readonly) is of type array<string,string|inte...,"readonly":"integer"}>, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
40
								'type'		=> $input,
41
								'name'		=> 'acf_pro_licence',
42
								'value'		=> str_repeat('*', strlen($license)),
43
								'readonly'	=> $readonly
44
							));
45
							
46
							?>
47
						</td>
48
					</tr>
49
					<tr>
50
						<th></th>
51
						<td>
52
							<input type="submit" value="<?php echo $button; ?>" class="acf-button blue">
53
						</td>
54
					</tr>
55
				</tbody>
56
			</table>
57
			</form>
58
            
59
		</div>
60
		
61
	</div>
62
	
63
	<div class="acf-box">
64
		<div class="title">
65
			<h3><?php _e('Update Information', 'acf'); ?></h3>
66
		</div>
67
		<div class="inner">
68
			<table class="form-table">
69
                <tbody>
70
                	<tr>
71
                    	<th>
72
                    		<label><?php _e('Current Version', 'acf'); ?></label>
73
                    	</th>
74
						<td>
75
							<?php echo $current_version; ?>
76
						</td>
77
					</tr>
78
					<tr>
79
                    	<th>
80
                    		<label><?php _e('Latest Version', 'acf'); ?></label>
81
                    	</th>
82
						<td>
83
							<?php echo $remote_version; ?>
84
						</td>
85
					</tr>
86
					<tr>
87
                    	<th>
88
                    		<label><?php _e('Update Available', 'acf'); ?></label>
89
                    	</th>
90
						<td>
91
							<?php if( $update_available ): ?>
92
								
93
								<span style="margin-right: 5px;"><?php _e('Yes', 'acf'); ?></span>
94
								
95
								<?php if( $active ): ?>
96
									<a class="acf-button blue" href="<?php echo admin_url('plugins.php?s=Advanced+Custom+Fields+Pro'); ?>"><?php _e('Update Plugin', 'acf'); ?></a>
97
								<?php else: ?>
98
									<a class="acf-button" disabled="disabled" href="#"><?php _e('Please enter your license key above to unlock updates', 'acf'); ?></a>
99
								<?php endif; ?>
100
								
101
							<?php else: ?>
102
								
103
								<span style="margin-right: 5px;"><?php _e('No', 'acf'); ?></span>
104
								<a class="acf-button" href="<?php echo add_query_arg('force-check', 1); ?>"><?php _e('Check Again', 'acf'); ?></a>
105
							<?php endif; ?>
106
						</td>
107
					</tr>
108
					<?php if( $changelog ): ?>
109
					<tr>
110
                    	<th>
111
                    		<label><?php _e('Changelog', 'acf'); ?></label>
112
                    	</th>
113
						<td>
114
							<?php echo $changelog; ?>
115
						</td>
116
					</tr>
117
					<?php endif; ?>
118
					<?php if( $upgrade_notice ): ?>
119
					<tr>
120
                    	<th>
121
                    		<label><?php _e('Upgrade Notice', 'acf'); ?></label>
122
                    	</th>
123
						<td>
124
							<?php echo $upgrade_notice; ?>
125
						</td>
126
					</tr>
127
					<?php endif; ?>
128
				</tbody>
129
			</table>
130
			</form>
131
            
132
		</div>
133
		
134
		
135
	</div>
136
	
137
</div>
138
<style type="text/css">
139
	#acf_pro_licence {
140
		width: 75%;
141
	}
142
</style>
143