mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 22:49:16 +00:00
fix: reject malformed Zigbee topology replies
Issue: #54 User-Visible: no
This commit is contained in:
@@ -5640,6 +5640,17 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: ' if (value) responseResolve?.(value);',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'zigbee-topology-z2m-malformed-response-waits-for-timeout',
|
||||
guard: 'node --test --test-name-pattern="malformed response immediately" test/zigbee-topology.test.mjs',
|
||||
because: 'a malformed response on the subscribed network-map topic must report invalid payload '
|
||||
+ 'immediately instead of leaving the settings dialog loading for the full timeout (#54 AC16)',
|
||||
patches: [{
|
||||
file: 'src/zigbee-topology-runtime.ts',
|
||||
find: " if (value === null) {\n if (responseActive) responseReject?.(fail('invalid_payload'));\n return;\n }",
|
||||
replace: ' if (value === null) return;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'zigbee-topology-z2m-subscriptions-leak',
|
||||
guard: 'node --test test/zigbee-topology.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user