This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/ripe-atlas@ripe.net/
[atlas] Invalid JSON because of DNS TXT records
- Previous message (by thread): [atlas] Invalid JSON because of DNS TXT records
- Next message (by thread): [atlas] University Carlos III of Madrid, Leganes, Spain has joined RIPE Atlas anchors
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Philip Homburg
philip.homburg at ripe.net
Fri May 15 12:07:25 CEST 2015
Hi Stephane, On 2015/05/15 6:50 , Stephane Bortzmeyer wrote: > The DNS, as we know, is a jungle. People put anything in their TXT > records, even control characters. > > Atlas faithfully returns this content in the JSON files (see > measurement #2004707). Then they are no longer legal JSON (RFC 7159, > section 7) and crash the JSON libraries. > > Who should fix it? My first guess is that Atlas should not produce > illegal JSON files and therefore should escape such texts. We already noticed various issues in this area. What goes wrong is the following. The probes avoid sending binary data by converting characters outside the printable ASCII range the an escape sequence using the '\u' notation. So for example for a control-Z the probe sends '\u001A'. The problem with this approach is that this escape sequence is actually defined by the JSON specs. So some of our backend code recognizes the escape sequence and converts it back to the control character. After that, there is a bug somewhere. And escaped characters sometimes end up in result downloads. After internal discussions, the best way forward seems to be to change the escape sequence. This way we don't have to rely on JSON parsers to leave the escape sequence unchanged. One option is to double the backslash and have probes send '\\u001A'. But maybe anybody has a better idea. Philip
- Previous message (by thread): [atlas] Invalid JSON because of DNS TXT records
- Next message (by thread): [atlas] University Carlos III of Madrid, Leganes, Spain has joined RIPE Atlas anchors
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]