Closed Bug 1204469 Opened 9 years ago Closed 7 years ago

[FindMyDevice] Fix .lock's reliance on non-guaranteed settings observer callback sequence

Categories

(Firefox OS Graveyard :: FindMyDevice, defect)

ARM
Gonk (Firefox OS)
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: cr, Unassigned)

References

Details

(Keywords: sec-want)

In https://mxr.mozilla.org/gaia/source/apps/findmydevice/js/commands.js#148 , FMD's lock function sets four settings: 150 var settings = { 151 'lockscreen.enabled': true, 152 'lockscreen.notifications-preview.enabled': false, 153 'lockscreen.passcode-lock.enabled': true, 154 'lockscreen.lock-immediately': true 155 }; It is absolutely crucial that the observer callbacks for 'lockscreen.enabled' and 'lockscreen.passcode-lock.enabled' have returned before the 'lockscreen.lock-immediately' observer callback is ultimately called, requesting to lock the device. The callback sequence currently works as expected, but there is no guarantee that it will stay that way. To fix this before it breaks, the 'lock-immediately' setting should be wrapped into a separate promise and .then()-chained appropriately with the promise for the other settings.
See Also: → 1186124
Severity: normal → minor
Keywords: sec-want
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.