Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
24 lines
871 B
Diff
24 lines
871 B
Diff
Fetched from https://blog.sonarsource.com/rainloop-emails-at-risk-due-to-code-flaw/
|
|
|
|
--- a/rainloop/rainloop/v/1.16.0/app/libraries/MailSo/Base/HtmlUtils.php
|
|
+++ b/rainloop/rainloop/v/1.16.0/app/libraries/MailSo/Base/HtmlUtils.php
|
|
@@ -239,7 +239,8 @@ class HtmlUtils
|
|
$oWrapHtml->setAttribute($sKey, $sValue);
|
|
}
|
|
|
|
- $oWrapDom = $oDom->createElement('div', '___xxx___');
|
|
+ $rand_str = base64_encode(random_bytes(32));
|
|
+ $oWrapDom = $oDom->createElement('div', $rand_str);
|
|
$oWrapDom->setAttribute('data-x-div-type', 'body');
|
|
foreach ($aBodylAttrs as $sKey => $sValue)
|
|
{
|
|
@@ -250,7 +251,7 @@ class HtmlUtils
|
|
|
|
$sWrp = $oDom->saveHTML($oWrapHtml);
|
|
|
|
- $sResult = \str_replace('___xxx___', $sResult, $sWrp);
|
|
+ $sResult = \str_replace($rand_str, $sResult, $sWrp);
|
|
}
|
|
|
|
$sResult = \str_replace(\MailSo\Base\HtmlUtils::$KOS, ':', $sResult);
|