-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Describe the bug
The SaveGameSimpleEncoder happily loads unencrypted files, instead of rejecting them. Because of that, I wanted to do a check to see that the file IS indeed encoded, so as to not allow files that are not encoded. To do so, I try to call SaveGame.Load() with the 'encode' parameter set to false, hoping to just be able to check that the result is null, and if it isn't I reject it, but if it is, then I proceed to try to load it with 'encode' set to true. Instead, FullSerializer stalls on the .Deserialize() call.
To Reproduce
Steps to reproduce the behavior:
- Make a file with the following byte-string in it: /n9F8q9UVOGEwCzFVEVRZvqHPBgHTGS25SPXqTXRlw+x7x5hfKznRSArbWeirwyxwoCXTAWgquAnSa89rGg5Cm158vpxCsIQRUx2ahPsFimFOpyNcNJGPsJjc53x/rojfhMq36AwO6wycEiQyJtoeBAnA1DiiEqZAJ5w+idQUVl4Zn1Grg7JTk9KPu5Pr8CijyaSmDX6dRhlUcGvQUQ86E+kYOn5LeerCdHTtXhugHAPAsiuaBfY3TamRWjPDVul3ST+ezAXb5/6HVxLmmgUBj2nj42uDcjSVkLkNoL4/zD4yEymu1OtZ+8rkwtqjOfrAeuBmElTZawrmWJdpzaFZsG642ZCm2KFkt6lPDun10CG8iveaBIWO567C5S0F6SeyoMkKUhHLqkrhHCGMHDz6DnfTRYAF72nBMLhtH0G1k18FNajvuVWMzqEIbgT/QaB6iXbLWLB4rzIpVJUZNS+B4MA9ZnXnl/VinlUWogck+Is5W1v4bmQb6Ltw/PJqK8mrIgRi9rFMOejO3OJ5phdqy37ARjHt+gygpjNZbcOXyQ=
- Do this call: SaveGame.Load<Dictionary<string, object>>(filePathAndName, false, string.Empty);
Expected behavior
For it to throw an exception or fail, and/or for SaveGame.Load() to return null if it does.
Desktop (please complete the following information):
- OS: Windows 10
- Unity 2021.3.16f1
- Save Game Free - Gold Update v2.4.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels