mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
feat(config): add DisableSaveIntegrityCheck flag for save transfers
The SHA-256 integrity check introduced in migration 0007 blocks saves when a character's savedata blob is imported from another server instance, because the stored hash in the target DB no longer matches the new blob. Adding DisableSaveIntegrityCheck (default: false) lets server operators bypass the check to unblock cross-server save transfers. A warning is logged each time the check is skipped so the flag's use is auditable. Documents the per-character SQL alternative in CHANGELOG: UPDATE characters SET savedata_hash = NULL WHERE id = <id> Closes #183.
This commit is contained in:
@@ -72,7 +72,8 @@ type Config struct {
|
||||
LoginNotices []string // MHFML string of the login notices displayed
|
||||
PatchServerManifest string // Manifest patch server override
|
||||
PatchServerFile string // File patch server override
|
||||
DeleteOnSaveCorruption bool // Attempts to save corrupted data will flag the save for deletion
|
||||
DeleteOnSaveCorruption bool // Attempts to save corrupted data will flag the save for deletion
|
||||
DisableSaveIntegrityCheck bool // Skip SHA-256 hash verification on load (needed for cross-server save transfers)
|
||||
ClientMode string
|
||||
RealClientMode Mode
|
||||
QuestCacheExpiry int // Number of seconds to keep quest data cached
|
||||
|
||||
@@ -150,7 +150,8 @@ func TestConfigStruct(t *testing.T) {
|
||||
LoginNotices: []string{"Welcome"},
|
||||
PatchServerManifest: "http://patch.example.com/manifest",
|
||||
PatchServerFile: "http://patch.example.com/files",
|
||||
DeleteOnSaveCorruption: false,
|
||||
DeleteOnSaveCorruption: false,
|
||||
DisableSaveIntegrityCheck: false,
|
||||
ClientMode: "ZZ",
|
||||
RealClientMode: ZZ,
|
||||
QuestCacheExpiry: 3600,
|
||||
|
||||
@@ -157,7 +157,8 @@ func TestConfigStructTypes(t *testing.T) {
|
||||
LoginNotices: []string{"Notice"},
|
||||
PatchServerManifest: "http://patch.example.com",
|
||||
PatchServerFile: "http://files.example.com",
|
||||
DeleteOnSaveCorruption: false,
|
||||
DeleteOnSaveCorruption: false,
|
||||
DisableSaveIntegrityCheck: false,
|
||||
ClientMode: "ZZ",
|
||||
RealClientMode: ZZ,
|
||||
QuestCacheExpiry: 3600,
|
||||
|
||||
Reference in New Issue
Block a user