Skip to content

Commit

Permalink
[BUGFIX] Remove extbase debugger markup in MailFactory.php
Browse files Browse the repository at this point in the history
There is the rare chance that some extbase debugger code is saved
in the database in the body field of mails. Switching to another
function solves the issue.

Related in2code-pro/powermail#3
Related in2code-de#897
Fixes in2code-de#920
  • Loading branch information
mschwemer committed Nov 3, 2023
1 parent 4fc5e40 commit c86e357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Domain/Factory/MailFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use In2code\Powermail\Utility\SessionUtility;
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
use TYPO3\CMS\Core\Utility\DebugUtility;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\Exception;
use TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException;
Expand Down Expand Up @@ -42,7 +42,7 @@ public function prepareMailForPersistence(Mail $mail, array $settings): void
->setSenderName($mailRepository->getSenderNameFromArguments($mail))
->setSubject($settings['receiver']['subject'])
->setReceiverMail($settings['receiver']['email'])
->setBody(DebugUtility::viewArray($mailRepository->getVariablesWithMarkersFromMail($mail)))
->setBody(ArrayUtility::arrayExport($mailRepository->getVariablesWithMarkersFromMail($mail)))
->setSpamFactor(SessionUtility::getSpamFactorFromSession())
->setTime((time() - SessionUtility::getFormStartFromSession($mail->getForm()->getUid(), $settings)))
->setUserAgent(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'))
Expand Down

0 comments on commit c86e357

Please sign in to comment.