summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-12-02 10:48:41 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-12-07 09:53:06 +0100
commitd05f131929b8812cac1c1e08bf8098d6df03b191 (patch)
tree130b90dd57776b587efccb767413e8fec21a7cc3 /lib/private
parent2959487f71c8226036ac3614bce27e3bbe60418a (diff)
downloadnextcloud-server-d05f131929b8812cac1c1e08bf8098d6df03b191.tar.gz
nextcloud-server-d05f131929b8812cac1c1e08bf8098d6df03b191.zip
Move overwritehost check to isTrustedDomain
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Security/TrustedDomainHelper.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php
index 5cbc08d0fd3..dc6b10c92b3 100644
--- a/lib/private/Security/TrustedDomainHelper.php
+++ b/lib/private/Security/TrustedDomainHelper.php
@@ -70,6 +70,11 @@ class TrustedDomainHelper {
* have been configured
*/
public function isTrustedDomain($domainWithPort) {
+ // overwritehost is always trusted
+ if ($this->config->getSystemValue('overwritehost') !== '') {
+ return true;
+ }
+
$domain = $this->getDomainWithoutPort($domainWithPort);
// Read trusted domains from config