We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d501f2d + cfc12b8 commit 6bdee05Copy full SHA for 6bdee05
1 file changed
lib/private/AppFramework/Http/Request.php
@@ -573,7 +573,14 @@ public function getId(): string {
573
* @return boolean true if $remoteAddress matches any entry in $trustedProxies, false otherwise
574
*/
575
protected function isTrustedProxy($trustedProxies, $remoteAddress) {
576
- return IpUtils::checkIp($remoteAddress, $trustedProxies);
+ try {
577
+ return IpUtils::checkIp($remoteAddress, $trustedProxies);
578
+ } catch (\Throwable) {
579
+ // We can not log to our log here as the logger is using `getRemoteAddress` which uses the function, so we would have a cyclic dependency
580
+ // Reaching this line means `trustedProxies` is in invalid format.
581
+ error_log('Nextcloud trustedProxies has malformed entries');
582
+ return false;
583
+ }
584
}
585
586
/**
0 commit comments