mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
Require that the first character of a class be a number or letter.
(imported from commit a4d1c23f784107198045aee7cec1f53ab5114762)
This commit is contained in:
parent
ec36170511
commit
33ad7817a4
@ -405,7 +405,8 @@ def json_remove_subscription(request):
|
||||
return json_success({"data": sub_name})
|
||||
|
||||
def valid_class_name(name):
|
||||
return re.match('^[a-z A-Z0-9_-]+$', name)
|
||||
# Classes must start with a letter or number.
|
||||
return re.match('^[a-zA-Z0-9][a-z A-Z0-9_-]*$', name)
|
||||
|
||||
@login_required
|
||||
@require_post
|
||||
|
||||
Loading…
Reference in New Issue
Block a user