This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/vendor/magento/module-sales/Model/Order/Email/Sender.php | |
+++ b/vendor/magento/module-sales/Model/Order/Email/Sender.php | |
@@ -73,6 +73,20 @@ | |
*/ | |
protected function checkAndSend(Order $order) | |
{ | |
+ $possibleExploitTags = ['{{', '}}', '()', '.()', 'base64_', 'this.', 'addAfterFilterCallback', '.filter', '.Filter', 'getTemplateFilter']; | |
+ $addressArray = $order->getAddressesCollection()->toArray()['items']; | |
+ $addressStringCombined = ""; | |
+ foreach ($addressArray as $addressArrayItem) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "cache-clean.js", | |
"type": "shell", | |
"command": "~/.config/composer/vendor/bin/cache-clean.js --watch", | |
"presentation": { | |
"reveal": "always", | |
"panel": "dedicated" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
magentodir=$1 | |
cd $magentodir | |
read -d '' script << PHP | |
<?php | |
\$composer = json_decode(file_get_contents('composer.json'), true); | |
if (!is_array(\$composer['autoload']['psr-0'][''])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function within($topic, ...$features) | |
{ | |
return function($do = 'getFailedAssertions') use ($topic, $features) { | |
if ($do === 'getName') { | |
return $topic; | |
} elseif ($do === 'getFailedAssertions') { | |
return array_reduce( | |
$features, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// put in magento root folder | |
// run via | |
// rm /tmp/magento; php persistent.php | |
// output is in /tmp/magento.log | |
function plog($msg) { | |
file_put_contents('/tmp/magento.log', date('H:i:s') . ': ' . $msg . PHP_EOL, FILE_APPEND); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Casper.js testing test | |
*/ | |
var testSuite = { | |
config: { | |
baseUrl: 'http://www.wholefoodsmarket.com', | |
}, | |
googleTest: function(){ |
We upgraded to 1.8 a couple of weeks ago, today i had to investigate this little gem:
The issue was reproducable by adding 3 of the above items to the cart, checking the db confirmed that the 2nd quote item already had the wrong tax value.
Digging down the culprit turned out to be in Mage_Tax_Model_Sales_Total_Quote_Subtotal and Mage_Tax_Model_Sales_Total_Quote_Tax:
collect() will call for each quote item:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu | |
declare -a file_patterns=('app/code/core' 'app/Mage.php$' '^index.php$') | |
exit_status=0 | |
while read x file; do | |
for file_pattern in ${file_patterns[@]}; do | |
if [[ $file =~ $file_pattern ]]; then |
NewerOlder