From 8ff36bdb165cff1f3bc1976ad5aee381f690021a Mon Sep 17 00:00:00 2001 From: Proxyfil Date: Tue, 21 Apr 2026 23:30:33 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=9D=20Updated=20links=20in=20CONTR?= =?UTF-8?q?IBUTING.md=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43d1d54..6d6f31e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ SPDX-License-Identifier: MPL-2.0 # Contribute to ClassQuiz For the development-setup, please check out the -docs: [classquiz.mawoka.eu/docs/develop](https://classquiz.mawoka.eu/docs/develop) +docs: [https://classquiz.de/docs/develop](https://classquiz.de/docs/develop) ## Formatting git-commits @@ -25,6 +25,6 @@ an issue here on GitHub. ## Want to translate? -Go to [Weblate](https://translate.mawoka.eu/projects/classquiz/frontend/). +Go to [Weblate](https://hosted.weblate.org/projects/classquiz/). If the language isn't available, please open an issue here, so I'll be able to add it. From 6656424110e89daf4b34a8d797b9658e6b98e07f Mon Sep 17 00:00:00 2001 From: iTrooz Date: Wed, 22 Apr 2026 15:48:14 +0200 Subject: [PATCH 2/3] fix: Check that player question_index input is the current question --- classquiz/socket_server/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classquiz/socket_server/__init__.py b/classquiz/socket_server/__init__.py index 52875cc..253864d 100644 --- a/classquiz/socket_server/__init__.py +++ b/classquiz/socket_server/__init__.py @@ -292,10 +292,16 @@ async def submit_answer(sid: str, data: dict): session = await get_session(sid, sio) question_index = int(float(data.question_index)) game_data = await PlayGame.get_from_redis(session["game_pin"]) + + if game_data.current_question != question_index: + await sio.emit("question_not_active", room=sid) + return + already_answered = await has_already_answered(session["game_pin"], question_index, session["username"]) if already_answered: await sio.emit("already_replied", room=sid) return + answer_right, answer = check_answer(game_data, data) latency = int(float(session["ping"])) time_q_started = datetime.fromisoformat(await redis.get(f"game:{session['game_pin']}:current_time")) From a490226f13beda11770678005fa3709b0b71b60e Mon Sep 17 00:00:00 2001 From: iTrooz Date: Wed, 22 Apr 2026 17:32:40 +0200 Subject: [PATCH 3/3] Update classquiz/socket_server/__init__.py Co-authored-by: Marlon --- classquiz/socket_server/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classquiz/socket_server/__init__.py b/classquiz/socket_server/__init__.py index 253864d..5ff3e6b 100644 --- a/classquiz/socket_server/__init__.py +++ b/classquiz/socket_server/__init__.py @@ -293,7 +293,7 @@ async def submit_answer(sid: str, data: dict): question_index = int(float(data.question_index)) game_data = await PlayGame.get_from_redis(session["game_pin"]) - if game_data.current_question != question_index: + if question_index != game_data.current_question: await sio.emit("question_not_active", room=sid) return