HTTP links are send in share mail if reverse proxy is used and the webserver just uses HTTP
- HTTPS links to the reverse proxy should be send.
@finius wrote in https://github.com/owncloud/core/issues/10838#issuecomment-54432238
But we faced now, that the URLs in the notification mails are mixed up with https and http links: The "logo-mail.gif" is always a http-link - regardless of what in "overwriteprotocol" is defined. The URL link to the shared file itself is just http, when ownCloud internal users are choosen through the autocomplete function while sharing the file on the website. https is used, when instead a reciepients emailadress is entered manually to share the file link.
Please remind, that on our ownCloud webserver, no SSL is configured for Apache2. So, the connection between ownCloud and the proxy is using HTTP and is therefore not secure. Just the connection between the external clients and the TMG Firewall is SSL encrypted and so using HTTPS.
cc @LukasReschke You know that fancy reverse proxy and overwritehost config stuff. Did you ever tried the notification mail and verified the URL?
I wonder how that is possible.
The URL is constructed using OC_Helper::makeURLAbsolute which is a fallback of \OCP\IURLGenerator::getAbsoluteURL. That function itself uses \OC_Request::serverProtocol to get the protocol which actually considers overwriteprotocol from the config.
<?php
session_write_close();
require_once('./lib/base.php');
var_dump(OC_Helper::makeURLAbsolute('/test.gif'));
With a custom protocol such as foo returns a foo:// URL on stable7 and master.
My best bet is that the person borked it's overwritecondaddr setting which results in \OC_Request::isOverwriteCondition returning false.
Doesn't seem so:
'overwritecondaddr' => '^10\.0\.0\.30$',
I believe @nickvergessen introduced a new config attribute for that: "overwrite.cli.url". Not sure if that's used for share mails though.
https://github.com/owncloud/core/blob/master/lib/private/urlgenerator.php#L166-L168 It's only used in CLI cases, I don't think the sharing emails are sent via CLI but directly.
Any update on this?
Any update ? @LukasReschke
Closing as obsolete. The config setting "overwrite.cli.url" should help with this.
the config setting "overwrite.cli.url" did the trick for me thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.