mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-03 03:27:13 +08:00
Add system data integrity check
This commit is contained in:
parent
448eeeee4a
commit
9e38ccccbc
@ -120,6 +120,11 @@ func (s *Server) HandleSavedataUpdate(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if system.TrainerId == 0 && system.SecretId == 0 {
|
||||||
|
http.Error(w, "invalid system data", http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var gobBuffer bytes.Buffer
|
var gobBuffer bytes.Buffer
|
||||||
err = gob.NewEncoder(&gobBuffer).Encode(system)
|
err = gob.NewEncoder(&gobBuffer).Encode(system)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user