Skip to content

Commit 5741b41

Browse files
committed
Fix CLI not accepting blinded ids for moderators/admins
1 parent 3439e48 commit 5741b41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sogs/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def print_room(room: Room):
252252
print("Error: --rooms is required when using --add-moderators", file=sys.stderr)
253253
sys.exit(1)
254254
for a in args.add_moderators:
255-
if not re.fullmatch(r'05[A-Fa-f0-9]{64}', a):
255+
if not re.fullmatch(r'[01]5[A-Fa-f0-9]{64}', a):
256256
print(f"Error: '{a}' is not a valid session id", file=sys.stderr)
257257
sys.exit(1)
258258
if len(args.rooms) > 1 and ('*' in args.rooms or '+' in args.rooms):
@@ -302,7 +302,7 @@ def print_room(room: Room):
302302
print("Error: --rooms is required when using --delete-moderators", file=sys.stderr)
303303
sys.exit(1)
304304
for a in args.delete_moderators:
305-
if not re.fullmatch(r'05[A-Fa-f0-9]{64}', a):
305+
if not re.fullmatch(r'[01]5[A-Fa-f0-9]{64}', a):
306306
print(f"Error: '{a}' is not a valid session id", file=sys.stderr)
307307
sys.exit(1)
308308
if len(args.rooms) > 1 and ('*' in args.rooms or '+' in args.rooms):

0 commit comments

Comments
 (0)