userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

FDSC loses key when closing Safari

Open FelixSFD opened this issue 7 years ago • 7 comments

I recently had issues with FDSC, because I had to grant the permission again and again. (see chat)

Now, I found out, when exactly this happens: When I restart Safari, the local storage for the FDSC-script (and only for this!) is deleted which results in an empty fdsc_msWriteToken.

Is there any additional option, I need to set in Tampermonkey to keep the token in the storage?

FelixSFD avatar Mar 03 '17 13:03 FelixSFD

This sounds like a browser thing to me. Local storage is a browser API that we leverage; is your browser set to discard data on exit?

ArtOfCode- avatar Mar 03 '17 16:03 ArtOfCode-

I haven't used FDSC on my MacBook's Safari since quite a lot of time, but IIRC (I may be wrong), it worked properly. I'll check this during spam-o-clock tomorrow.

double-fault avatar Mar 03 '17 16:03 double-fault

I have other scripts installed and they don't lose their stored data. I'll test it with an other browser this weekend

FelixSFD avatar Mar 03 '17 16:03 FelixSFD

I've grepped the FDSC code for "local" and there doesn't seem to be any code to delete stuff from local storage. The only time it writes to the storage is when you enter the authentication token. I've never seen this issue happen either to me (FF/Win10/barely ever restart) or in the chat.

That being said, FDSC uses some cross-domain storage and I'm not entirely sure how it works. Others are welcome to investigate further.

honnza avatar Mar 03 '17 16:03 honnza

@honnza effectively, all the local storage is actually stored on the metasmoke domain; other domains query it.

ArtOfCode- avatar Mar 03 '17 16:03 ArtOfCode-

I could not reproduce it with Chrome 56.0.2924.87 with the latest version of Tampermonkey. :-/

FelixSFD avatar Mar 04 '17 16:03 FelixSFD

I use Safari, and this happens to me as well.

NobodyNada avatar Mar 06 '17 04:03 NobodyNada