Skip to content

Commit 2b97f33

Browse files
committed
Some safety around ACL allows.
Related: #56.
1 parent 9d84169 commit 2b97f33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/models/ServerAcl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ export class ServerAcl {
104104
if (!allowed || allowed.length === 0) {
105105
allowed.push("*"); // allow everything
106106
}
107+
if (!allowed.some(server => new MatrixGlob(server).test(this.homeserver))) {
108+
allowed.push(this.homeserver);
109+
}
107110
return {
108111
allow: allowed,
109112
deny: this.safeDeniedServers(),

0 commit comments

Comments
 (0)