Web server: Nginx
PHP version: 7.3
Nextcloud Version: 16.0.5
Mail app version: 0.17.0
Two domains on the same host:
Original link in mail:
<a href="https://mail.domain2.de/some/dir/">Description</a>
Should be proxy-transformed to:
<a href="https://cloud.domain1.de/apps/mail/redirect?src=https%3A%2F%2Fmail.domain2.de%2Fsome%2Fdir%2F" target="_blank" rel="noopener noreferrer">Description</a>
Instead the link clicked ist:
https://cloud.domain1.de/apps/mail/redirect?src=https%3A%2F%2Fcloud.domain1.de%2Fmail.domain2.de%2Fsome%2Fdir%2F
( _https://cloud.domain1.de/mail.domain2.de/some/dir/_ )
I just skimmed the code.
Because both domains are on the same host this isnt working as intended:
mail/lib/Service/HtmlPurify/TransformURLScheme.php
$uri = new \HTMLPurifier_URI(
$this->request->getServerProtocol(), null, $this->request->getServerHost(), null,
$this->urlGenerator->linkToRoute('mail.proxy.redirect'),
'src=' . $originalURL, null);
return $uri;
Because both domains are on the same host this isnt working as intended:
Yep, I suspect the same.
I found the mistake.
Instead of https:// the link started with https:/// (3x/).
Didnt see that. Embarrassing.
Also Firefox simply replaced the /// with // when opened with other mailprograms.
closed, sorry