1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

Merge pull request #6465 from ryanpetrello/ws-bad-group-syntax

prevent ws group subscription if not specified in the valid format

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-03-27 22:02:47 +00:00 committed by GitHub
commit 508c9b3102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,11 +170,9 @@ class EventConsumer(AsyncJsonWebsocketConsumer):
continue
new_groups.add(name)
else:
if group_name == settings.BROADCAST_WEBSOCKET_GROUP_NAME:
logger.warn("Non-priveleged client asked to join broadcast group!")
return
new_groups.add(group_name)
await self.send_json({"error": "access denied to channel"})
logger.error(f"groups must be a list, not {groups}")
return
old_groups = current_groups - new_groups
for group_name in old_groups: