The /api/edges endpoint crashes with HTTP 500 when any traceroute record has route = None (malformed or incomplete packet).
A single such packet takes down the endpoint for all users until the service is restarted.
Traceback
File "/app/meshview/web_api/api.py", line 484, in api_edges
path = [tr.packet.from_node_id] + list(route.route)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'route'
Proposed fix
Add a guard before line 484:
if route is None or route.route is None:
continue
path = [tr.packet.from_node_id] + list(route.route)
Notes
Fix applied on our instance and confirmed working.
## Description
The /api/edges endpoint crashes with HTTP 500 when any traceroute record has route = None (malformed or incomplete packet).
A single such packet takes down the endpoint for all users until the service is restarted.
## Traceback
File "/app/meshview/web_api/api.py", line 484, in api_edges
path = [tr.packet.from_node_id] + list(route.route)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'route'
## Proposed fix
Add a guard before line 484:
if route is None or route.route is None:
continue
path = [tr.packet.from_node_id] + list(route.route)
## Notes
Fix applied on our instance and confirmed working.
<!-- github-sync-id:4252847801 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
The /api/edges endpoint crashes with HTTP 500 when any traceroute record has route = None (malformed or incomplete packet).
A single such packet takes down the endpoint for all users until the service is restarted.
Traceback
File "/app/meshview/web_api/api.py", line 484, in api_edges
path = [tr.packet.from_node_id] + list(route.route)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'route'
Proposed fix
Add a guard before line 484:
Notes
Fix applied on our instance and confirmed working.
Thank you, fix will be added to version 3.6