File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
lib/private/AppFramework/Http Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -573,7 +573,14 @@ public function getId(): string {
573573 * @return boolean true if $remoteAddress matches any entry in $trustedProxies, false otherwise
574574 */
575575 protected function isTrustedProxy ($ trustedProxies , $ remoteAddress ) {
576- return IpUtils::checkIp ($ remoteAddress , $ trustedProxies );
576+ 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+ }
577584 }
578585
579586 /**
You can’t perform that action at this time.
0 commit comments