mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(federation): 🐛 Make an empty allowed_ip list for bridge correctly allow any IP
This commit is contained in:
parent
b55237cdc8
commit
259fba17a7
|
|
@ -167,6 +167,10 @@ export class InboxProcessor {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.federation.bridge.allowed_ips.length === 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.requestIp) {
|
if (!this.requestIp) {
|
||||||
return {
|
return {
|
||||||
message: "The request IP address could not be determined.",
|
message: "The request IP address could not be determined.",
|
||||||
|
|
@ -174,11 +178,9 @@ export class InboxProcessor {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.federation.bridge.allowed_ips.length > 0) {
|
for (const ip of config.federation.bridge.allowed_ips) {
|
||||||
for (const ip of config.federation.bridge.allowed_ips) {
|
if (matches(ip, this.requestIp.address)) {
|
||||||
if (matches(ip, this.requestIp.address)) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue