[TimerEditList] Crash when incorrect PIN entered

Issue #728 resolved
prl created an issue

If parental controls are applied to the timer list, the timer list is entered (e.g. TIMER from live TV) and an incorrect PIN is entered 3 times, the UI crashes.

The error is that the callback in the error MessageBox opened in TimerEditList.pinEntered()is self.close and not self.closeProtectedScreen.

The cleanest fix is to simply add the ProtectedScreen mixin to TimerEditListand override ProtectedScreen.isProtected()appropriately. This is hindered by an unused import from Screens.ChannelSelection in Screens.ParentalControlSetup that causes an import dependency loop, so that import also needs to be removed. The incorrect cut/paste from ProtectedScreen into TimerEditList may have been motivated by the problem in importing ProtectedScreen into TimerEditList.

Replication steps

In MENU>Setup>TV>Parental control, set a PIN and enable Protect screens and Protect timer menu (other protection settings may remain as they are). Save the settings and exit back to live TV.

Then TIMER, enter the PIN incorrectly 3 times (just pressing OK without entering a PIN will also work), the GUI crashes on entering the 3rd incorrect PIN.

Comments (2)

  1. Peter Urbanec

    Fix bug #728: [TimerEditList] Crash when incorrect PIN entered

    Replace incorrect cut/paste code from ProtectedScreen with an import of ProtectedScreen used as a mixin, with TimerEditList.isProtected() appropriately overriding ProtectedScreen.isProtected().

    → <<cset 2cbea21d1597>>

  2. Log in to comment