Page MenuHomePhabricator

Infinite loop in quiz shuffleAnswers
Closed, ResolvedPublic

Description

Quiz implements shuffleAnswers incorrectly. If 11 or more answers are shuffled, Question::basicTypeParseObject() enters an infinite loop.

This was reported to me with the test case https://en.wikinews.org/wiki/User:Gryllida/Quiz/StyleGuide?action=edit&oldid=4430878

I've prepared a patch.

Event Timeline

tstarling created this task.Sep 6 2018, 3:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 6 2018, 3:20 AM

Change 458348 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/extensions/Quiz@master] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458348

Change 458348 merged by jenkins-bot:
[mediawiki/extensions/Quiz@master] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458348

Change 458349 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/extensions/Quiz@wmf/1.32.0-wmf.19] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458349

Change 458350 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/extensions/Quiz@wmf/1.32.0-wmf.20] [1.32.0-wmf.20] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458350

Change 458349 merged by jenkins-bot:
[mediawiki/extensions/Quiz@wmf/1.32.0-wmf.19] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458349

Change 458350 merged by jenkins-bot:
[mediawiki/extensions/Quiz@wmf/1.32.0-wmf.20] [1.32.0-wmf.20] Fix shuffleAnswers infinite loop

https://gerrit.wikimedia.org/r/458350

Mentioned in SAL (#wikimedia-operations) [2018-09-06T04:08:14Z] <tstarling@deploy1001> Synchronized php-1.32.0-wmf.20/extensions/Quiz/Question.php: T203628 (duration: 00m 56s)

tstarling closed this task as Resolved.Sep 6 2018, 4:17 AM
tstarling claimed this task.