mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
Fix 1: load() now returns {"boot_id": None, "peers": []} directly instead
of returning dict(_EMPTY), preventing shared mutable list between failed loads.
Removed now-unused _EMPTY constant.
Fix 2: expired() now checks isinstance(ts, str) before len(ts) to fail-closed
on non-string expires_ts (malformed on-disk data treated as expired, never crash).
Fix 3: Added 3 regression tests for boundary conditions:
- test_in_range_excludes_network_and_broadcast: verify network/broadcast excluded
- test_expired_failclosed_on_non_string_ts: verify non-string ts swept safely
- test_load_missing_returns_independent_dicts: verify no mutable list sharing
ref #p2p-ephemeral
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| annuaire_client.py | ||
| dht.py | ||
| ephemeral.py | ||
| federation.py | ||
| macro_grant.py | ||
| main.py | ||
| masterlink.py | ||
| mesh.py | ||
| registry.py | ||