fix(spoof): require = in global key-assignment check

isGlobalKeyAssignment treated any bare line whose first token
matched system/boot/vendor/all as a global assignment and
stripped it. A user line of literally "all" or "system" written
without a value (malformed config but reachable) thus got eaten
on the next atomicWrite. Require '=' in the trimmed line before
treating it as a key=value assignment.
This commit is contained in:
Enginex0
2026-05-19 05:34:59 +01:00
parent e737453e02
commit d146ad8234
@@ -170,8 +170,8 @@ object PatchLevelManager {
}
private fun isGlobalKeyAssignment(trimmed: String): Boolean {
if (trimmed.isEmpty() || trimmed.startsWith("#")) return false
val key = trimmed.substringBefore("=").trim().lowercase()
if (trimmed.isEmpty() || trimmed.startsWith("#") || '=' !in trimmed) return false
val key = trimmed.substringBefore('=').trim().lowercase()
return key in GLOBAL_KEYS
}