Skip to content

Commit

Permalink
[3.1.4] Prevent direct access to files woocommerce#1575
Browse files Browse the repository at this point in the history
  • Loading branch information
coenjacobs committed Oct 15, 2012
1 parent 1e3dfb1 commit 943091d
Show file tree
Hide file tree
Showing 169 changed files with 413 additions and 18 deletions.
3 changes: 3 additions & 0 deletions classes/class-wc-product-variation.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* @package WooCommerce/Classes
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Product_Variation extends WC_Product {

/** @var array Stores variation data (attributes) for the current variation. */
Expand Down
3 changes: 3 additions & 0 deletions classes/class-wc-session-transients.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* @package WooCommerce/Classes
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Session_Transients extends WC_Session {

/** customer_id */
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-customer-completed-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_Completed_Order extends WC_Email {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-customer-invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_Invoice extends WC_Email {

var $find;
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-customer-new-account.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_New_Account extends WC_Email {

var $user_login;
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-customer-note.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_Note extends WC_Email {

var $customer_note;
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-customer-processing-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_Processing_Order extends WC_Email {

/**
Expand Down
2 changes: 2 additions & 0 deletions classes/emails/class-wc-email-customer-reset-password.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* @author WooThemes
* @extends WC_Email
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_Customer_Reset_Password extends WC_Email {

/** @var string */
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email-new-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Email
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email_New_Order extends WC_Email {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/emails/class-wc-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @author WooThemes
* @extends WC_Settings_API
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Email extends WC_Settings_API {

/** @var string Payment method ID. */
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/bacs/class-wc-bacs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_BACS extends WC_Payment_Gateway {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/cheque/class-wc-cheque.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Cheque extends WC_Payment_Gateway {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/class-wc-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Payment_Gateway extends WC_Settings_API {

/** @var string Payment method ID. */
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/cod/class-wc-cod.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author Patrick Garman
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_COD extends WC_Payment_Gateway {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/mijireh/class-wc-mijireh-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author Mijireh
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Mijireh_Checkout extends WC_Payment_Gateway {

/** @var string Access key for mijireh */
Expand Down
5 changes: 4 additions & 1 deletion classes/gateways/mijireh/includes/Address.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_Address extends Mijireh_Model {

public function __construct() {
Expand Down
5 changes: 4 additions & 1 deletion classes/gateways/mijireh/includes/Item.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_Item extends Mijireh_Model {

private function _init() {
Expand Down
2 changes: 2 additions & 0 deletions classes/gateways/mijireh/includes/Mijireh.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

$root_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;

// Require the mijireh library classes
Expand Down
4 changes: 3 additions & 1 deletion classes/gateways/mijireh/includes/Model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_Model {

Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/mijireh/includes/Order.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_Order extends Mijireh_Model {

private function _init() {
Expand Down
2 changes: 2 additions & 0 deletions classes/gateways/mijireh/includes/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* This code is licensed for use, modification, and distribution
* under the terms of the MIT License (see http://en.wikipedia.org/wiki/MIT_License)
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_Rest {

Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/mijireh/includes/RestJSON.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Mijireh_RestJSON extends Mijireh_Rest {

public function post($url, $data, $headers=array()) {
Expand Down
3 changes: 3 additions & 0 deletions classes/gateways/paypal/class-wc-paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Payment
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Paypal extends WC_Payment_Gateway {

var $notify_url;
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/class-wc-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Integrations
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Integration extends WC_Settings_API {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Integrations
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_Google_Analytics extends WC_Integration {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/sharedaddy/class-wc-sharedaddy.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Integrations
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_ShareDaddy extends WC_Integration {

/**
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/sharethis/class-wc-sharethis.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Integrations
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_ShareThis extends WC_Integration {

/** @var string Default code for share this */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

require_once "sdk/class.shareyourcart-base.php";

class ShareYourCartWooCommerce extends ShareYourCartBase {
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/shareyourcart/class-wc-shareyourcart.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @package WooCommerce/Classes/Integrations
* @author WooThemes
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class WC_ShareYourCart extends WC_Integration {

var $ShareYourCartWooCommerce;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* * Copyright (C) 2011 Barandi Solutions
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

if(!class_exists('ShareYourCartAPI',false)){

class ShareYourCartAPI {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* DESCRIPTION: This class is used as a base class for every PHP plugin we create.
* * Copyright (C) 2012 Barandi Solutions
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

require_once(dirname(__FILE__) ."/class.shareyourcart-api.php");

if(!class_exists('ShareYourCartBase',false)){
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/shareyourcart/sdk/messages/config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

/**
* This is the configuration for generating message translations
* for the app. It is used by the 'yiic message' command.
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/shareyourcart/sdk/messages/cs/sdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*
* @version $Id: $
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

return array (
'API Status:' => '',
'App Key' => '',
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/shareyourcart/sdk/messages/fr/sdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*
* @version $Id: $
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

return array (
'API Status:' => '',
'App Key' => '',
Expand Down
3 changes: 3 additions & 0 deletions classes/integrations/shareyourcart/sdk/messages/ro/sdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*
* @version $Id: $
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

return array (
'API Status:' => '',
'App Key' => '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<script type="text/javascript">
if(_gaq) _gaq.push(['_trackPageview', '/admin/create-view']);
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<script type="text/javascript">
if(_gaq) _gaq.push(['_trackPageview', '/admin/recover-view']);
</script>
Expand Down
4 changes: 4 additions & 0 deletions classes/integrations/shareyourcart/sdk/views/admin-header.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<link rel="stylesheet" type="text/css" href="<?php echo $this->createUrl(dirname(__FILE__).'/../css/admin-style.css'); ?>" />
<script type="text/javascript">

Expand Down
4 changes: 4 additions & 0 deletions classes/integrations/shareyourcart/sdk/views/admin-page.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<script type="text/javascript">
if(_gaq) _gaq.push(['_trackPageview', '/admin-view']);
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<a href="<?php echo $this->SHAREYOURCART_BUTTON_URL ?>" class="shareyourcart-button" <?php echo (isset($callback_url) && !empty($callback_url)) ? "data-syc-callback_url=$callback_url" : ''; ?> data-syc-layout="custom">
<?php echo $button_html;?>
</a>
Expand Down
4 changes: 3 additions & 1 deletion classes/integrations/shareyourcart/sdk/views/button-img.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

// If only the hover is uploaded
if((!$button_img or !$button_img_width or !$button_img_height) and ($button_img_hover and $button_img_hover_width and $button_img_hover_height)) {
$button_img = $button_img_hover;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<?php if(!$this->isActive()) return; //if the plugin is not active, do not show this page ?>
<script type="text/javascript">
if(_gaq) _gaq.push(['_trackPageview', '/admin/button-settings-view']);
Expand Down
4 changes: 4 additions & 0 deletions classes/integrations/shareyourcart/sdk/views/button.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>

<a href="<?php echo $this->SHAREYOURCART_BUTTON_URL ?>" class="shareyourcart-button <?php echo ( $this->getConfigValue('button_position') == 'floating' ? 'button_iframe' : 'button_iframe-normal');?> <?php echo ( !$this->getConfigValue('dont_set_height') ? 'button_height' : ''); ?>" <?php echo (isset($callback_url) && !empty($callback_url)) ? "data-syc-callback_url=$callback_url" : ''; ?> data-syc-skin="<?php echo $this->getConfigValue('button_skin');?>" data-syc-orientation="<?php echo $this->getConfigValue('button_position'); ?>" >
ShareYourCart Discount
</a>
Expand Down
Loading

0 comments on commit 943091d

Please sign in to comment.