Issues (103)

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/providers/aweber/functions-admin.php (3 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
 * BetterOptin Provider Aweber
4
 *
5
 * @package   BetterOptin/Provider/Aweber
6
 * @author    ThemeAvenue <[email protected]>
7
 * @license   GPL-2.0+
8
 * @link      http://themeavenue.net
9
 * @copyright 2015 ThemeAvenue
10
 */
11
12
// If this file is called directly, abort.
13
if ( ! defined( 'WPINC' ) ) {
14
	die;
15
}
16
17
add_filter( 'wpbo_checklist', 'wpbo_aw_add_step' );
18
/**
19
 * Add new step.
20
 *
21
 * Add a step in the checklist during popup creation process
22
 * in order to was the user if the settings are not correct.
23
 *
24
 * @since  1.0.0
25
 *
26
 * @param  array $checklist Current checklist
27
 *
28
 * @return array            Updated checklist
29
 */
30
function wpbo_aw_add_step( $checklist ) {
31
32
	$new   = array();
33
	$step  = array(
34
		'label'   => __( 'Setup Aweber', 'wpbo' ),
35
		'check'   => wpbo_is_aweber_ready(),
36
		'against' => true,
37
		'compare' => 'EQUAL'
38
	);
39
40
	foreach ( $checklist as $id => $check ) {
41
42
		if ( 'published' == $id ) {
43
			$new['aweber'] = $step;
44
		}
45
46
		$new[ $id ] = $check;
47
48
	}
49
50
	return $new;
51
52
}
53
54
add_filter( 'wpbo_publish_button_action', 'wpbo_aw_prevent_publishing', 10, 2 );
55
/**
56
 * Prevent from publishing popup if Aweber is not ready.
57
 *
58
 * @since  1.0.0
59
 *
60
 * @param  array $data    Sanitized data
61
 * @param  array $postarr Raw data
62
 *
63
 * @return array          Sanitized data with updated status
64
 */
65 View Code Duplication
function wpbo_aw_prevent_publishing( $data, $postarr ) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
66
67
	if ( 'wpbo-popup' == $postarr['post_type'] && 'publish' == $data['post_status'] ) {
68
69
		if ( ! wpbo_is_aweber_ready() ) {
70
			$data['post_status'] = 'draft';
71
		}
72
73
	}
74
75
	return $data;
76
77
}
78
79
add_filter( 'wpbo_publish_button_label', 'wpbo_publish_button_label', 10, 2 );
80
/**
81
 * Change publish button label
82
 *
83
 * @since 1.0
84
 *
85
 * @param string $translation
86
 * @param string $text
87
 *
88
 * @return string
89
 */
90 View Code Duplication
function wpbo_publish_button_label( $translation, $text ) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
91
92
	global $typenow;
93
94
	if ( 'wpbo-popup' == $typenow ) {
95
96
		if ( isset( $_GET['post'] ) && 'Publish' == $text && ! wpbo_is_aweber_ready() ) {
97
			$translation = __( 'Save', 'wpbo' );
98
		}
99
100
	}
101
102
	return $translation;
103
104
}
105
106
add_action( 'admin_notices', 'wpbo_aw_settings_warning' );
107
/**
108
 * User warning.
109
 *
110
 * Warn user if settings are not correct.
111
 *
112
 * @since  1.0.0
113
 */
114 View Code Duplication
function wpbo_aw_settings_warning() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
115
116
	if ( ! wpbo_is_aweber_ready() ): ?>
117
118
		<div class="error">
119
			<p><?php printf( __( 'Aweber integration is not correctly setup. Your popups won\'t send subscribers anywhere! <a href="%s">Click here to see the settings</a>.', 'wpbo' ), esc_url( add_query_arg( array(
120
					'post_type' => 'wpbo-popup',
121
					'page'      => 'edit.php?post_type=wpbo-popup-settings&tab=aweber'
122
				), admin_url( 'edit.php' ) ) ) ); ?></p>
123
		</div>
124
125
	<?php endif;
126
127
}