Closed Bug 1136002 Opened 11 years ago Closed 11 years ago

[email] try/catch around cookie cache decoding for extra protection

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S7 (6mar)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: jrburke, Assigned: jrburke)

Details

Attachments

(1 external file)

Bug 1124426 improved the discarding the cookie cache if it got too big for an extreme reason. However, looking more at the code, asuth suggested a try/catch around the decodeURIComponent if by some really really extreme reason the cache fits in the expected size but is corrupt for some reason.
Comment on attachment 8568371 [details] [review] [gaia] jrburke:bug1136002-email-trycatch-cache > mozilla-b2g:master Tested on device by manually adding '%r%r to the beginning of the string passed to decodeURIComponent, and app continued to launch and work, just printing an error in the log. Then removed the manual hack and confirmed the cache still works as before.
Attachment #8568371 - Flags: review?(bugmail)
Attachment #8568371 - Flags: review?(bugmail) → review+
Keywords: checkin-needed
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment on attachment 8568371 [details] [review] [gaia] jrburke:bug1136002-email-trycatch-cache > mozilla-b2g:master [Approval Request Comment] [Bug caused by] (feature/regressing bug #): This is more of a follow-up to bug 1124426, which did most of the improvements. This adds some extra security that we will keep going if what is saved is somehow corrupt. [User impact] if declined: If the cookie cache fails for decoding purposes, the screen will be blank. [Testing completed]: On device, manually triggering cases where it activates. [Risk to taking this patch] (and alternatives if risky): Close to zero, it adds a try/catch so should be less risky than the previous code. [String changes made]: none
Attachment #8568371 - Flags: approval-gaia-v2.2?
Attachment #8568371 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: