feat: reject invalid icf / v0.00
Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
Raymond
2026-06-11 22:54:44 -04:00
parent c3f75e6428
commit 3e2c198204

View File

@@ -104,6 +104,12 @@ class AllNet(
var session: String? = null
val gameId = reqMap["game_id"] ?: return "".also { logger.warn("> Rejected: No game_id provided") }
val ver = reqMap["ver"] ?: "1.0"
if ((ver.toDoubleOrNull() ?: 0.0) < 1.0)
return "".also { logger.warn("> Rejected: Version $ver is not allowed (typically bad ICF)") }
// Proper keychip authentication
if (props.checkKeychip) {
// If it's a user keychip, it should be in user database
@@ -129,8 +135,6 @@ class AllNet(
}
}
val gameId = reqMap["game_id"] ?: return "".also { logger.warn("> Rejected: No game_id provided") }
val ver = reqMap["ver"] ?: "1.0"
val formatVer = reqMap["format_ver"] ?: ""
val resp = props.map.mut + mapOf(