FreifunkBremen / yanic

Yet another node info collector - for respondd to be used with meshviewer to Grafana (with influxdb or graphite)
https://freifunkbremen.github.io/yanic/
GNU Affero General Public License v3.0
20 stars 41 forks source link

Yanic does not seem to handle invalid node IDs well. #212

Closed GoliathLabs closed 2 years ago

GoliathLabs commented 2 years ago

We currently have the problem that yanic does not handle invalid node IDs well. Since two nodes in two of our segments return invalid node IDs, the statistics of these segments contain some voids

Apr 13 18:14:33 gateway yanic[1369485]: time="2022-04-13T18:14:33.505+02:00" level="warn" msg="invalid NodeID" data.address="[someipv6address]:1001" data.node_id="\\tb8412009a738" caller="collector.go:261 github.com/FreifunkBremen/yanic/respond.(*Collector).saveResponse"
genofire commented 2 years ago

There are Tabs in the node ID ... You should fix your network or install well known respond-daemons

awlx commented 2 years ago

You cannot fix nodes which you cannot control. Nobody needs to use the FFMUC provided firmware. So those things can happen and yanic should be able to handle those conditions.

In general "user provided" input should be sanitised, everyone with a python script can flood respondd with any infos. This shouldn't lead to a crash or lack of data.

genofire commented 2 years ago

The flooding or wrong data is validated by the userid and there wrong Format ... so if yanic crash please send a bugeeport with tracelog that we could improve that validation function (we are really happy to recieve such bug reports oft crashes).

I am really unhappy with that idea to accept such non alphanumeric characters like tabs in an nodeid. Do you have open an Issue in that community to ask, why they use such strange chars in nodeIDs?

genofire commented 2 years ago

Thanks for closing 😁😅

GoliathLabs commented 2 years ago

We still need to update our Yanic to the latest version. We will then try to reproduce the problem described above, and if it still occurs, reopen the issue.