Issues (2873)

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.

deprecated/classes/PodsAPI.php (10 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
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 7 and the first side effect is on line 2.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
require_once PODS_DIR . 'deprecated/deprecated.php';
3
4
/**
5
 * @package Pods\Deprecated
6
 */
7
class PodsAPI_Deprecated {
8
9
	private $obj;
10
11
	public $snap = false;
12
13
	public $dt = 0;
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $dt. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
14
15
	public $dtname = '';
16
17
	public $fields = array();
18
19
	public $use_pod_id = false;
20
21
	/**
22
	 * Constructor - PodsAPI Deprecated functionality (pre 2.0)
23
	 *
24
	 * @param object $obj The PodsAPI object
25
	 *
26
	 * @license http://www.gnu.org/licenses/gpl-2.0.html
27
	 * @since   2.0
28
	 */
29
	public function __construct( $obj ) {
30
31
		// backwards-compatibility with references to $this->var_name
32
		$vars = get_object_vars( $obj );
33
34
		foreach ( (array) $vars as $key => $val ) {
35
			$this->{$key} = $val;
36
		}
37
38
		// keeping references pointing back to the source
39
		$this->obj =& $obj;
40
	}
41
42
	/**
43
	 * Add or edit a column within a Pod
44
	 *
45
	 * $params['id'] int The field ID
46
	 * $params['pod_id'] int The Pod ID
47
	 * $params['pod'] string The Pod name
48
	 * $params['name'] string The field name
49
	 * $params['label'] string The field label
50
	 * $params['type'] string The column type ("txt", "desc", "pick", etc)
51
	 * $params['pick_object'] string The related PICK object name
52
	 * $params['pick_val'] string The related PICK object value
53
	 * $params['sister_id'] int (optional) The related field ID
54
	 * $params['weight'] int The field weight
55
	 * $params['options'] array The field options
56
	 *
57
	 * @param array $params An associative array of parameters
58
	 *
59
	 * @since 1.7.9
60
	 */
61
	public function save_column( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
62
63
		pods_deprecated( 'PodsAPI::save_field', '2.0' );
64
65
		return $this->obj->save_field( $params );
66
	}
67
68
	/**
69
	 * Save the entire role structure
70
	 *
71
	 * @param array $params An associative array of parameters
72
	 *
73
	 * @since 1.7.9
74
	 * @return bool
75
	 */
76
	public function save_roles( $params ) {
77
78
		pods_deprecated( '[use WP roles and capabilities instead]', '2.0' );
79
80
		return false;
81
	}
82
83
	/**
84
	 * Drop a Pod and all its content
85
	 *
86
	 * $params['id'] int The Pod ID
87
	 * $params['name'] string The Pod name
88
	 *
89
	 * @param array $params An associative array of parameters
90
	 *
91
	 * @since 1.7.9
92
	 */
93
	public function drop_pod( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
94
95
		pods_deprecated( 'PodsAPI::delete_pod', '2.0' );
96
97
		return $this->obj->delete_pod( $params );
98
	}
99
100
	/**
101
	 * Drop a column within a Pod
102
	 *
103
	 * $params['id'] int The column ID
104
	 * $params['name'] int The column name
105
	 * $params['pod'] string The Pod name
106
	 * $params['pod_id'] string The Pod name
107
	 *
108
	 * @param array $params An associative array of parameters
109
	 *
110
	 * @since 1.7.9
111
	 */
112
	public function drop_column( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
113
114
		pods_deprecated( 'PodsAPI::delete_field', '2.0' );
115
116
		return $this->obj->delete_field( $params );
117
	}
118
119
	/**
120
	 * Drop a Pod Template
121
	 *
122
	 * $params['id'] int The template ID
123
	 * $params['name'] string The template name
124
	 *
125
	 * @param array $params An associative array of parameters
126
	 *
127
	 * @since 1.7.9
128
	 */
129
	public function drop_template( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
130
131
		pods_deprecated( 'PodsAPI::delete_template', '2.0' );
132
133
		return $this->obj->delete_template( $params );
134
	}
135
136
	/**
137
	 * Drop a Pod Page
138
	 *
139
	 * $params['id'] int The page ID
140
	 * $params['uri'] string The page URI
141
	 *
142
	 * @param array $params An associative array of parameters
143
	 *
144
	 * @since 1.7.9
145
	 */
146
	public function drop_page( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
147
148
		pods_deprecated( 'PodsAPI::delete_page', '2.0' );
149
150
		return $this->obj->delete_page( $params );
151
	}
152
153
	/**
154
	 * Drop a Pod Helper
155
	 *
156
	 * $params['id'] int The helper ID
157
	 * $params['name'] string The helper name
158
	 *
159
	 * @param array $params An associative array of parameters
160
	 *
161
	 * @since 1.7.9
162
	 */
163
	public function drop_helper( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
164
165
		pods_deprecated( 'PodsAPI::delete_helper', '2.0' );
166
167
		return $this->obj->delete_helper( $params );
168
	}
169
170
	/**
171
	 * Drop a single pod item
172
	 *
173
	 * $params['id'] int (optional) The item's ID from the wp_pod_* table (used with datatype parameter)
174
	 * $params['pod'] string (optional) The datatype name (used with id parameter)
175
	 * $params['pod_id'] int (optional) The datatype ID (used with id parameter)
176
	 * $params['bypass_helpers'] bool Set to true to bypass running pre-save and post-save helpers
177
	 *
178
	 * @param array $params An associative array of parameters
179
	 *
180
	 * @since 1.7.9
181
	 */
182
	public function drop_pod_item( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
183
184
		pods_deprecated( 'PodsAPI::delete_pod_item', '2.0' );
185
186
		return $this->obj->delete_pod_item( $params );
187
	}
188
189
	/**
190
	 * Load a column
191
	 *
192
	 * $params['pod_id'] int The Pod ID
193
	 * $params['id'] int The field ID
194
	 * $params['name'] string The field name
195
	 *
196
	 * @param array $params An associative array of parameters
197
	 *
198
	 * @since 1.7.9
199
	 */
200
	public function load_column( $params ) {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
201
202
		pods_deprecated( 'PodsAPI::load_column', '2.0', 'PodsAPI::load_field' );
203
204
		return $this->obj->load_field( $params );
205
	}
206
}
207