ID:657229
 
Not a bug
BYOND Version:494
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Firefox 12.0
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
This issue also applies to Linux DD, and I'd assume Windows DD as well.

Chatters uses client-side savefiles with encrypted data to store user preferences. Occasionally, a user will be unable to join. Instead, they will be disconnected upon joining and the following message appears in data/saves/logs/log.txt:

BYOND Error: failed to parse savefile text at line 0 (reading '#'):


This is due to the client-side savefile. I assumed that this would mean that it was a corrupt savefile, but I wanted to verify. I received a corrupted one from HiroTDK and I cracked it open in two different non-BYOND savefile editors to verify that it was in fact corrupted. Much to my dismay, it wasn't actually corrupt (as far as the savefile format goes, at least).

So from here, the only way I can proceed is posting a bug report on the matter. The latest Chatters source, which exhibits the problem, can be found here. For convenience's sake, I've uploaded a working copy of Chatters along with the client-side savefile here.

To reproduce the issue, all you have to do is put 43410.sav into your KeyInfo directory and start Chatters.dmb through DS or DD. Hiro had this issue initially and I experienced it in a separate instance, then I took his savefile and was able to reproduce it myself.
The first one I typo'd, but it was just a link to the source if it was necessary. The second one works for me, though.
I believe the savefile is not corrupt--it was merely encoded in such a way that its contents are not valid anymore. I'm basing this on the code that calls ImportText(), which is what triggers the message you received. RC5_Decrypt() is being called with a value that may have changed, depending on when the savefile was encrypted. To deal with this issue, you basically just have to do some kind of simple validity text on the decrypted text; I'd imagine there are a few common text strings you could search for to accomplish that. I'm having trouble testing with your savefile but I think the only issue is the encryption.
Lummox JR changed status to 'Unverified'
I had a little bit of a dumb moment there. I isolated a test case with that savefile and RC5_Decrypt'd it and it's definitely complete garbage. I guess we can chalk it up to an RC5 bug, since the key hasn't changed in the lifespan of this particular savefile.
That depends; if the savefile is new and wasn't generated with an old .dmb, then definitely. But the read value of the key would change in newer versions; it is not a safe encryption key.
It all happened within the same BYOND version & DMB, so I think it's safe to rule that out. I'm not entirely sure what compelled them to use that for the encryption key in the first place.
Okay, that's good to know. This wouldn't have been a bug if it was that, but now it definitely sounds like the encryption itself has an issue. Since that's all soft code, and the main savefile itself seems to be working, I think we can safely rule out a BYOND bug.
Lummox JR resolved issue (Not a bug)