File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ limitations under the License.
15
15
*/
16
16
17
17
import { ICommand } from "./ICommand" ;
18
- import { MatrixClient } from "matrix-bot-sdk" ;
18
+ import { LogService , MatrixClient } from "matrix-bot-sdk" ;
19
19
import { Conference } from "../Conference" ;
20
20
import { ResolvedPersonIdentifier } from "../invites" ;
21
21
import { runRoleCommand } from "./actions/roles" ;
@@ -49,6 +49,12 @@ export class PermissionsCommand implements ICommand {
49
49
50
50
for ( const person of people ) {
51
51
if ( ! person . mxid ) continue ;
52
+
53
+ if ( ! / ^ @ [ ^ : ] + : [ ^ \. ] + \. .+ $ / . test ( person . mxid ) ) {
54
+ LogService . warn ( "PermissionsCommand" , `ignoring invalid MXID ${ person . mxid } ` ) ;
55
+ continue ;
56
+ }
57
+
52
58
if ( powerLevels [ 'users' ] [ person . mxid ] ) continue ;
53
59
powerLevels [ 'users' ] [ person . mxid ] = 50 ;
54
60
}
You can’t perform that action at this time.
0 commit comments