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.

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 39 and the first side effect is on line 69.

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
/*
3
Plugin Name: Pods - Custom Content Types and Fields
4
Plugin URI: https://pods.io/
5
Description: Pods is a framework for creating, managing, and deploying customized content types and fields
6
Version: 2.7.4-a-1
7
Author: Pods Framework Team
8
Author URI: https://pods.io/about/
9
Text Domain: pods
10
GitHub Plugin URI: https://github.com/pods-framework/pods
11
12
Copyright 2009-2018  Pods Foundation, Inc  (email : [email protected])
13
14
This program is free software; you can redistribute it and/or modify
15
it under the terms of the GNU General Public License as published by
16
the Free Software Foundation; either version 2 of the License, or
17
(at your option) any later version.
18
19
This program is distributed in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
GNU General Public License for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with this program; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
27
*/
28
29
/**
30
 * @package Pods\Global
31
 */
32
33
// Prevent conflicts with Pods 1.x
34
if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
35
	add_action( 'init', 'pods_deactivate_pods_1_x' );
36
	add_action( 'init', 'pods_deactivate_pods_ui' );
37
} else {
38
	// Current version
39
	define( 'PODS_VERSION', '2.7.4-a-1' );
40
41
	// Version tracking between DB updates themselves
42
	define( 'PODS_DB_VERSION', '2.3.5' );
43
44
	// This should always be -2 versions behind the latest WP release
45
	// To be updated each Major x.x Pods release
46
	if ( ! defined( 'PODS_WP_VERSION_MINIMUM' ) ) {
47
		define( 'PODS_WP_VERSION_MINIMUM', '4.5' );
48
	}
49
50
	// This should match minimum WP requirements or usage (90%+)
51
	// Found at: https://wordpress.org/about/stats/
52
	if ( ! defined( 'PODS_PHP_VERSION_MINIMUM' ) ) {
53
		define( 'PODS_PHP_VERSION_MINIMUM', '5.3' );
54
	}
55
56
	// This should match minimum WP requirements or usage (90%+)
57
	// Found at: https://wordpress.org/about/stats/
58
	// Using 5.1 for now, many RedHat servers aren't EOL yet and they backport security releases
59
	if ( ! defined( 'PODS_MYSQL_VERSION_MINIMUM' ) ) {
60
		define( 'PODS_MYSQL_VERSION_MINIMUM', '5.1' );
61
	}
62
63
	define( 'PODS_SLUG', plugin_basename( __FILE__ ) );
64
	define( 'PODS_URL', plugin_dir_url( __FILE__ ) );
65
	define( 'PODS_DIR', plugin_dir_path( __FILE__ ) );
66
67
	// Prevent conflicts with old Pods UI plugin
68
	if ( function_exists( 'pods_ui_manage' ) ) {
69
		add_action( 'init', 'pods_deactivate_pods_ui' );
70
	} else {
71
		global $pods, $pods_init, $pods_form;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
72
73
		require_once PODS_DIR . 'includes/classes.php';
74
		require_once PODS_DIR . 'includes/data.php';
75
		require_once PODS_DIR . 'includes/general.php';
76
77
		if ( ! defined( 'PODS_MEDIA' ) || PODS_MEDIA ) {
78
			require_once PODS_DIR . 'includes/media.php';
79
		}
80
81
		if ( ! defined( 'SHORTINIT' ) || ! SHORTINIT ) {
82
			if ( pods_allow_deprecated() ) {
83
				require_once PODS_DIR . 'deprecated/deprecated.php';
84
			}
85
86
			if ( false !== pods_compatibility_check() ) {
87
				$pods_form = pods_form();
88
89
				if ( ! is_network_admin() ) {
90
					$pods_init = pods_init();
91
				}
92
			}
93
		}
94
	}
95
}
96
97
/**
98
 * Deactivate Pods 1.x or other Pods plugins
99
 */
100
function pods_deactivate_pods_1_x() {
101
102
	if ( defined( 'PODS_VERSION' ) && defined( 'PODS_DIR' ) && file_exists( untrailingslashit( PODS_DIR ) . '/init.php' ) ) {
103
		if ( ! function_exists( 'deactivate_plugins' ) ) {
104
			include_once ABSPATH . 'wp-admin/includes/plugin.php';
105
		}
106
107
		deactivate_plugins( realpath( untrailingslashit( PODS_DIR ) . '/init.php' ) );
108
109
		if ( ! headers_sent() && ( ! function_exists( 'pods_ui_manage' ) && ! file_exists( WP_CONTENT_DIR . 'plugins/pods-ui/pods-ui.php' ) ) ) {
110
			wp_redirect( $_SERVER['REQUEST_URI'] );
111
			die();
112
		}
113
	}
114
115
}
116
117
/**
118
 * Deactivate Pods UI plugin
119
 */
120
function pods_deactivate_pods_ui() {
121
122
	if ( function_exists( 'pods_ui_manage' ) && file_exists( WP_CONTENT_DIR . 'plugins/pods-ui/pods-ui.php' ) ) {
123
		if ( ! function_exists( 'deactivate_plugins' ) ) {
124
			include_once ABSPATH . 'wp-admin/includes/plugin.php';
125
		}
126
127
		deactivate_plugins( realpath( WP_CONTENT_DIR . 'plugins/pods-ui/pods-ui.php' ) );
128
129
		if ( ! headers_sent() ) {
130
			wp_redirect( $_SERVER['REQUEST_URI'] );
131
			die();
132
		}
133
	}
134
135
}
136