mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Add type checking to events_register_backend.
(imported from commit bb3ddbfc0e471f276858d47fbdb65c890af41606)
This commit is contained in:
parent
0cdcf102a0
commit
7e04b205fa
@ -2117,6 +2117,11 @@ def events_register_backend(request, user_profile, apply_markdown=True,
|
||||
event_types=REQ(converter=json_to_list, default=None),
|
||||
narrow=REQ(converter=json_to_list, default=[]),
|
||||
queue_lifespan_secs=REQ(converter=int, default=0)):
|
||||
|
||||
error = check_list(check_string)('event_types', event_types)
|
||||
if error:
|
||||
raise JsonableError(error)
|
||||
|
||||
ret = do_events_register(user_profile, request.client, apply_markdown,
|
||||
event_types, queue_lifespan_secs, all_public_streams,
|
||||
narrow=narrow)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user