Authenticator-Extension / Authenticator

Authenticator generates 2-Step Verification codes in your browser.
https://authenticator.cc
MIT License
3.43k stars 800 forks source link

Try to prevent issues if chrome.storage.get unexpectedly returns undefined #1216

Closed mymindstorm closed 4 months ago

mymindstorm commented 5 months ago

Attempt to fix #1215

mymindstorm commented 5 months ago

The CI is a problem with upstream. I've patched as a stopgap until https://github.com/mujo-code/puppeteer-headful/pull/134 gets merged. After this is merged, #1214 should also pass.

Sneezry commented 5 months ago

Is this a Chrome issue? chrome.storage.get should never return null or undefined. If it unexpectedly does, it could affect the account data. Is my understanding correct?

mymindstorm commented 5 months ago

It's documented that storage.get may cause managed storage get to return undefined. These parts of the code are the only calls which should generate the reported error messages.

This issue is very strange. I'm wondering if it might be a corrupted disk or bug in chrome. I'll keep searching for a root cause as you make a very good point.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea/get

-------- Original message -------- From: Zhe Li @.> Date: 6/25/24 11:20 PM (GMT-06:00) To: Authenticator-Extension/Authenticator @.> Cc: Brendan Early @.>, Author @.> Subject: Re: [Authenticator-Extension/Authenticator] Try to prevent issues if chrome.storage.get unexpectedly returns undefined (PR #1216)

Is this a Chrome issue? chrome.storage.get should never return null or undefined. If it unexpectedly does, it could affect the account data. Is my understanding correct?

— Reply to this email directly, view it on GitHubhttps://github.com/Authenticator-Extension/Authenticator/pull/1216#issuecomment-2190551881, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGUAT3WG5DJMELK5AG27E6LZJI6QNAVCNFSM6AAAAABJ43MNK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQGU2TCOBYGE. You are receiving this because you authored the thread.Message ID: @.***>

Sneezry commented 5 months ago

Let's merge this PR first, and then continue exploring whether the unexpected results from reading the storage have any security impact on the account data.