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/admin/admin.php (8 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
class acf_admin {
4
	
5
	/*
6
	*  __construct
7
	*
8
	*  Initialize filters, action, variables and includes
9
	*
10
	*  @type	function
11
	*  @date	23/06/12
12
	*  @since	5.0.0
13
	*
14
	*  @param	n/a
15
	*  @return	n/a
16
	*/
0 ignored issues
show
The doc-type n/a could not be parsed: Unknown type name "n/a" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
17
	
18
	function __construct() {
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...
19
	
20
		// actions
21
		add_action('admin_menu', 			array($this, 'admin_menu'));
22
		add_action('admin_enqueue_scripts',	array($this, 'admin_enqueue_scripts'), 0);
23
		add_action('admin_notices', 		array($this, 'admin_notices'));
24
		
25
	}
26
	
27
	
28
	/*
29
	*  admin_menu
30
	*
31
	*  This function will add the ACF menu item to the WP admin
32
	*
33
	*  @type	action (admin_menu)
34
	*  @date	28/09/13
35
	*  @since	5.0.0
36
	*
37
	*  @param	n/a
38
	*  @return	n/a
39
	*/
0 ignored issues
show
The doc-type n/a could not be parsed: Unknown type name "n/a" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
40
	
41
	function admin_menu() {
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...
42
		
43
		// bail early if no show_admin
44
		if( !acf_get_setting('show_admin') ) {
45
			
46
			return;
47
			
48
		}
49
		
50
		
51
		// vars
52
		$slug = 'edit.php?post_type=acf-field-group';
53
		$cap = acf_get_setting('capability');
54
		
55
		
56
		// add parent
57
		add_menu_page(__("Custom Fields",'acf'), __("Custom Fields",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', '80.025');
58
		
59
		
60
		// add children
61
		add_submenu_page($slug, __('Field Groups','acf'), __('Field Groups','acf'), $cap, $slug );
62
		add_submenu_page($slug, __('Add New','acf'), __('Add New','acf'), $cap, 'post-new.php?post_type=acf-field-group' );
63
		
64
	}
65
	
66
	
67
	/*
68
	*  admin_enqueue_scripts
69
	*
70
	*  This function will add the already registered css
71
	*
72
	*  @type	function
73
	*  @date	28/09/13
74
	*  @since	5.0.0
75
	*
76
	*  @param	n/a
77
	*  @return	n/a
78
	*/
0 ignored issues
show
The doc-type n/a could not be parsed: Unknown type name "n/a" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
79
	
80
	function admin_enqueue_scripts() {
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...
81
		
82
		wp_enqueue_style( 'acf-global' );
83
		
84
	}
85
	
86
	
87
	/*
88
	*  admin_notices
89
	*
90
	*  This function will render any admin notices
91
	*
92
	*  @type	function
93
	*  @date	17/10/13
94
	*  @since	5.0.0
95
	*
96
	*  @param	n/a
97
	*  @return	n/a
98
	*/
0 ignored issues
show
The doc-type n/a could not be parsed: Unknown type name "n/a" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
99
	
100
	function admin_notices() {
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...
101
		
102
		// vars
103
		$admin_notices = acf_get_admin_notices();
104
		
105
		
106
		// bail early if no notices
107
		if( empty($admin_notices) ) {
108
			
109
			return;
110
			
111
		}
112
		
113
		
114
		foreach( $admin_notices as $notice ) {
115
			
116
			$open = '';
117
			$close = '';
118
				
119
			if( $notice['wrap'] ) {
120
				
121
				$open = "<{$notice['wrap']}>";
122
				$close = "</{$notice['wrap']}>";
123
				
124
			}
125
				
126
			?>
127
			<div class="notice is-dismissible <?php echo $notice['class']; ?>"><?php echo $open . $notice['text'] . $close; ?></div>
128
			<?php
129
				
130
		}
131
		
132
	}
133
	
134
}
135
136
137
// initialize
138
new acf_admin();
139
140
?>
141