From 1297cf201b24f4ca02976a238074bf74aef28dff Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 14 Apr 2019 19:56:14 +0000 Subject: [PATCH] Fix room authentication --- CHANGELOG.md | 2 ++ yaboli/room.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 169e87f..399f28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next version +- fix room authentication + ## 1.1.1 (2019-04-14) - add database class for easier sqlite3 access diff --git a/yaboli/room.py b/yaboli/room.py index 905162f..5ea5e03 100644 --- a/yaboli/room.py +++ b/yaboli/room.py @@ -191,8 +191,11 @@ class Room: async def _on_bounce_event(self, packet: Any) -> None: data = packet["data"] - # Can we even authenticate? - if not "passcode" in data.get("auth_options", []): + # Can we even authenticate? (Assuming that passcode authentication is + # available if no authentication options are given: Euphoria doesn't + # (always) send authentication options, even when passcode + # authentication works.) + if not "passcode" in data.get("auth_options", ["passcode"]): self._set_connected_failed() return