Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from 202ecommerce/develop
Browse files Browse the repository at this point in the history
Release 2.2.6
  • Loading branch information
bogdan202 authored Feb 10, 2023
2 parents d03ed0c + 772b97d commit 15aa156
Show file tree
Hide file tree
Showing 103 changed files with 156 additions and 154 deletions.
24 changes: 24 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Security Policy

The 202ecommerce team and community take security bugs in this PrestaShop modules seriously. We appreciate your efforts to responsibly disclose your findings.

## Supported Versions

Security updates will typically only be applied to the latest release.

## Reporting a Vulnerability

Security issues can be reported by sending an email to [email protected], which will go to security team members.
The team will send a response indicating the next steps in handling your report.
After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

When the security team receives a security bug report, they will assign it to a primary handler.
This person will coordinate the fix and release process, involving the following steps:
- Confirm the problem and determine the affected versions.
- Audit code to find any potential similar problems.
- Prepare fixes for all releases still under maintenance. These fixes will be released as fast as possible.


## Disclosure Policy

In general, public disclosure are made after the issue has been fully identified and a patch is ready to be released.
2 changes: 1 addition & 1 deletion 202/build.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<property name="src-dir" value="${basedir}" />
<property name="TARGETNAME" value="ebay" />
<property name="TARGETBRANCH" value="${env.GIT_BRANCH}" />
<property name="TARGETVERSION" value="2.2.5" />
<property name="TARGETVERSION" value="2.2.6" />

<target name="build" depends="build-common,package-zip,psvalidator" />

Expand Down
1 change: 1 addition & 0 deletions 202/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parameters:
ignoreErrors:
#PHPStan doesn't understand our method_exists() safeguards.
- '#Call to an undefined static method Module::hookExec\(\)\.#'
- '#Call to an undefined static method Attribute::getAttributeMinimalQty\(\)\.#'

reportUnmatchedIgnoredErrors: false
level: 1
1 change: 0 additions & 1 deletion backward_compatibility/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

if ((bool) Configuration::get('PS_MOBILE_DEVICE')) {
require_once _PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php';
}
Expand Down
1 change: 0 additions & 1 deletion backward_compatibility/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

if (version_compare(_PS_VERSION_, '1.7', '>=')) {
/**
* Class allow to display tpl on the FO
Expand Down
1 change: 0 additions & 1 deletion backward_compatibility/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

Expand Down
1 change: 0 additions & 1 deletion classes/Const/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class Common
{
const COUNTRY_DEFAULT = 'EBAY_COUNTRY_DEFAULT';
Expand Down
1 change: 0 additions & 1 deletion classes/Const/EbaySiteMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbaySiteMap
{
public static function get()
Expand Down
1 change: 0 additions & 1 deletion classes/Const/ProfileConf.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class ProfileConf
{
const USER_AUTH_TOKEN = 'USER_AUTH_TOKEN';
Expand Down
1 change: 0 additions & 1 deletion classes/Const/TlsConf.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class TlsConf
{
const STATUS_SUCCESS = 202;
Expand Down
1 change: 0 additions & 1 deletion classes/DbEbay.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class DbEbay
{
/** @var Db */
Expand Down
1 change: 0 additions & 1 deletion classes/EbayAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayAlert
{
private $ebay_profile;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayApiLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayApiLog extends ObjectModel
{
public $id_ebay_profile;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayBestOffers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayBestOffers extends ObjectModel
{
public $id_ebay_profile;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayBussinesPolicies.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayBussinesPolicies
{
public static function getPoliciesbyType($type, $id_ebay_profile)
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayCategory
{
private $id_category; /* PrestaShop category id */
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCategoryCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

if (file_exists(dirname(__FILE__) . '/EbayRequest.php')) {
require_once dirname(__FILE__) . '/EbayRequest.php';
}
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCategoryConditionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayCategoryConditionConfiguration
{
const PS_CONDITION_NEW = 1;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCategoryConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayCategoryConfiguration
{
/**
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCategorySpecificValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayCategorySpecificValue
{
public static function insertIgnore($data)
Expand Down
1 change: 0 additions & 1 deletion classes/EbayConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

if (file_exists(dirname(__FILE__) . '/EbayRequest.php')) {
require_once dirname(__FILE__) . '/EbayRequest.php';
}
Expand Down
1 change: 0 additions & 1 deletion classes/EbayCountrySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

if (!in_array('Ebay', get_declared_classes())) {
require_once dirname(__FILE__) . '/../ebay.php';
}
Expand Down
1 change: 0 additions & 1 deletion classes/EbayDbValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayDbValidator
{
private $logs;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayDebugTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayDebugTools
{
public static function updateProfileIdentifier($old, $new)
Expand Down
1 change: 0 additions & 1 deletion classes/EbayDeliveryTimeOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayDeliveryTimeOptions
{
public static function getAll()
Expand Down
1 change: 0 additions & 1 deletion classes/EbayLoadLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

abstract class EbayLoadLogs
{
protected $file;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayLog extends ObjectModel
{
public $type;
Expand Down
5 changes: 2 additions & 3 deletions classes/EbayLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayLogger
{
const DEBUG = 0;
Expand Down Expand Up @@ -268,14 +267,14 @@ private function log($severity, $msg, $context = null, $backtrace = null)
'severity' => (int) $severity,
'code' => 0,
'message' => pSQL($msg),
'context' => $ctx ? pSQL(Tools::jsonEncode($ctx)) : null,
'context' => $ctx ? pSQL(json_encode($ctx)) : null,
'backtrace' => $backtrace,
]
);
} else {
$sql = 'INSERT INTO ' . _DB_PREFIX_ . 'ebay_logs(`uid`, `datetime`, `severity`, `code`, `message`, `context`, `backtrace`)
VALUES(\'' . (int) $this->uid . '\', \'' . $datetime . '\', \'' . (int) $severity . '\', \'0\', \'' . pSQL($msg) . '\',
\'' . pSQL($ctx ? Tools::jsonEncode($ctx) : null) . '\', \'' . pSQL($backtrace) . '\')';
\'' . pSQL($ctx ? json_encode($ctx) : null) . '\', \'' . pSQL($backtrace) . '\')';

Db::getInstance()->Execute($sql);
}
Expand Down
17 changes: 11 additions & 6 deletions classes/EbayOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayOrder
{
private $id_ebay_order;
Expand Down Expand Up @@ -533,12 +532,18 @@ public function updateCartQuantities($ebay_profile)
}
}

// check if product is in this cart
// if (!count($this->carts[$ebay_profile->id_shop]->getProducts(false, $product['id_product'])))
// continue;

$prod = new Product($product['id_product'], false, $id_lang);
$minimal_quantity = empty($product['id_product_attribute']) ? $prod->minimal_quantity : (int) Attribute::getAttributeMinimalQty($product['id_product_attribute']);

if (empty($product['id_product_attribute'])) {
$minimal_quantity = $prod->minimal_quantity;
} else {
// class Attribute renamed to ProductAttribute since PS 8.0
if (class_exists('ProductAttribute')) {
$minimal_quantity = ProductAttribute::getAttributeMinimalQty($product['id_product_attribute']);
} else {
$minimal_quantity = Attribute::getAttributeMinimalQty($product['id_product_attribute']);
}
}

if ($product['quantity'] >= $minimal_quantity) {
$id_product_attribute = empty($product['id_product_attribute']) ? null : $product['id_product_attribute'];
Expand Down
3 changes: 1 addition & 2 deletions classes/EbayOrderErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayOrderErrors extends ObjectModel
{
public $error;
Expand Down Expand Up @@ -109,7 +108,7 @@ public static function getEbayOrdersCountry()

if ($rows = Db::getInstance()->ExecuteS($q)) {
foreach ($rows as $row) {
$error = Tools::jsonDecode($row['error']);
$error = json_decode($row['error']);
if ($error->type == 'country') {
$result[$error->iso_code][] = $row;
}
Expand Down
1 change: 0 additions & 1 deletion classes/EbayOrderLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayOrderLog extends ObjectModel
{
public $id_ebay_profile;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayPayment extends PaymentModule
{
public function __construct()
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayProduct
{
public static function getIdProductRef($id_product, $ebay_identifier, $ebay_site_id, $id_attribute = null, $id_shop = null)
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProductConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayProductConfiguration
{
public static function getByProductIdAndProfile($product_id, $id_ebay_profile)
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProductImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

require_once dirname(__FILE__) . '/EbayRequest.php';

class EbayProductImage
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProductModified.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayProductModified extends ObjectModel
{
public $id_product;
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProductTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayProductTemplate extends ObjectModel
{
/**
Expand Down
1 change: 0 additions & 1 deletion classes/EbayProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license Commercial license
* International Registered Trademark & Property of PrestaShop SA
*/

class EbayProfile extends ObjectModel
{
public $id_lang;
Expand Down
Loading

0 comments on commit 15aa156

Please sign in to comment.