Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Securely Save and Load for my game? #1795

Open
lavyoa opened this issue Apr 7, 2024 · 1 comment
Open

Securely Save and Load for my game? #1795

lavyoa opened this issue Apr 7, 2024 · 1 comment

Comments

@lavyoa
Copy link

lavyoa commented Apr 7, 2024

I'm implementing save and load system using messagepack for my Unity game.
I have only used json serializer (json.Net) before, so I'm quite new to binary serialization.

What I'm concerned about is possible security issues you mentioned when deserializing.
Since my game is client-only I don't see that much of a problem.
However, what I'm worried about is if I have to receive save data from users and deserialize it on my machine.
Could this be a possible vulnerability to code injection or any other malicious actions?
To be clear, I'm only asking about the deserialization process.

I'm using untrusted data option and only typed resolvers when deserializing.

Thank you in advance!

@AArnott
Copy link
Collaborator

AArnott commented Apr 7, 2024

Using the untrusted data option and avoiding the Typeless formatter and resolver should be adequate protection from code injection attacks, at least as far as we know today. What you do with the deserialized data after that is on you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants