Issues (1182)

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.

templates/checkout/review-order.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
 * Review order table
4
 *
5
 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php.
6
 *
7
 * HOWEVER, on occasion WooCommerce will need to update template files and you
8
 * (the theme developer) will need to copy the new files to your theme to
9
 * maintain compatibility. We try to do this as little as possible, but it does
10
 * happen. When this occurs the version of the template file will be bumped and
11
 * the readme will list any important changes.
12
 *
13
 * @see 	    https://docs.woothemes.com/document/template-structure/
14
 * @author 		WooThemes
15
 * @package 	WooCommerce/Templates
16
 * @version     2.3.0
17
 */
18
19
if ( ! defined( 'ABSPATH' ) ) {
20
	exit;
21
}
22
?>
23
<table class="shop_table woocommerce-checkout-review-order-table">
24
	<thead>
25
		<tr>
26
			<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
27
			<th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
28
		</tr>
29
	</thead>
30
	<tbody>
31
		<?php
32
			do_action( 'woocommerce_review_order_before_cart_contents' );
33
34
			foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
35
				$_product     = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
36
37
				if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
38
					?>
39
					<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
40
						<td class="product-name">
41
							<?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ) . '&nbsp;'; ?>
42
							<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times; %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
43
							<?php echo WC()->cart->get_item_data( $cart_item ); ?>
44
						</td>
45
						<td class="product-total">
46
							<?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
47
						</td>
48
					</tr>
49
					<?php
50
				}
51
			}
52
53
			do_action( 'woocommerce_review_order_after_cart_contents' );
54
		?>
55
	</tbody>
56
	<tfoot>
57
58
		<tr class="cart-subtotal">
59
			<th><?php _e( 'Subtotal', 'woocommerce' ); ?></th>
60
			<td><?php wc_cart_totals_subtotal_html(); ?></td>
61
		</tr>
62
63
		<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
64
			<tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
65
				<th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
66
				<td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
67
			</tr>
68
		<?php endforeach; ?>
69
70
		<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
71
72
			<?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
73
74
			<?php wc_cart_totals_shipping_html(); ?>
75
76
			<?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
77
78
		<?php endif; ?>
79
80 View Code Duplication
		<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
0 ignored issues
show
This code seems to be duplicated across 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...
81
			<tr class="fee">
82
				<th><?php echo esc_html( $fee->name ); ?></th>
83
				<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
84
			</tr>
85
		<?php endforeach; ?>
86
87
		<?php if ( wc_tax_enabled() && 'excl' === WC()->cart->tax_display_cart ) : ?>
88
			<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
89
				<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
90
					<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
91
						<th><?php echo esc_html( $tax->label ); ?></th>
92
						<td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
93
					</tr>
94
				<?php endforeach; ?>
95
			<?php else : ?>
96
				<tr class="tax-total">
97
					<th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
98
					<td><?php wc_cart_totals_taxes_total_html(); ?></td>
99
				</tr>
100
			<?php endif; ?>
101
		<?php endif; ?>
102
103
		<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
104
105
		<tr class="order-total">
106
			<th><?php _e( 'Total', 'woocommerce' ); ?></th>
107
			<td><?php wc_cart_totals_order_total_html(); ?></td>
108
		</tr>
109
110
		<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
111
112
	</tfoot>
113
</table>
114