Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/private/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
try {
$mailer->send($message->getSymfonyEmail());
} catch (TransportExceptionInterface $e) {
$logMessage = sprintf('Sending mail to "%s" with subject "%s" failed', print_r($message->getTo(), true), $message->getSubject());

Check failure on line 207 in lib/private/Mail/Mailer.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedHtml

lib/private/Mail/Mailer.php:207:83: TaintedHtml: Detected tainted HTML (see https://psalm.dev/245)
$this->logger->error($logMessage, ['app' => 'core', 'exception' => $e]);
if ($debugMode) {
$this->logger->debug($e->getDebug(), ['app' => 'core']);
Expand All @@ -224,7 +224,7 @@
}

// Debugging logging
$logMessage = sprintf('Sent mail to "%s" with subject "%s"', print_r($message->getTo(), true), $message->getSubject());

Check failure on line 227 in lib/private/Mail/Mailer.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedHtml

lib/private/Mail/Mailer.php:227:72: TaintedHtml: Detected tainted HTML (see https://psalm.dev/245)
$this->logger->debug($logMessage, ['app' => 'core']);

return [];
Expand Down Expand Up @@ -293,6 +293,8 @@

$streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', []);
if (is_array($streamingOptions) && !empty($streamingOptions)) {
$rootCertPath = $streamingOptions['ssl']['cafile'] ?? $this->config->getValue('default_certificates_bundle_path', null) ?? '';

Check failure on line 296 in lib/private/Mail/Mailer.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedInterfaceMethod

lib/private/Mail/Mailer.php:296:73: UndefinedInterfaceMethod: Method OCP\IConfig::getValue does not exist (see https://psalm.dev/181)
Copy link
Member

@provokateurin provokateurin Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use \OCP\ICertificateManager::getAbsoluteBundlePath instead.

$streamingOptions['ssl']['cafile'] = $rootCertPath;
/** @psalm-suppress InternalMethod */
$currentStreamingOptions = $stream->getStreamOptions();

Expand Down
Loading