[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #5637 [Metrics Utilities]: Ignore carriage returns when parsing descriptors



#5637: Ignore carriage returns when parsing descriptors
-------------------------------+--------------------------------------------
 Reporter:  karsten            |          Owner:  karsten
     Type:  defect             |         Status:  new    
 Priority:  minor              |      Milestone:         
Component:  Metrics Utilities  |        Version:         
 Keywords:                     |         Parent:         
   Points:                     |   Actualpoints:         
-------------------------------+--------------------------------------------
 There are some (very old) server descriptors containing carriage returns
 in their contact line, more precisely in a full PGP key block.  I'm
 attaching one such descriptor to this ticket.

 It's unclear if carriage returns are permitted by dir-spec.txt.  It does
 say `"ArgumentChar ::= any printing ASCII character except NL."`, but we
 know that Tor accepts non-ASCII characters in contact or platform lines,
 too.  So, I guess the only non-permitted character is NL.

 In metrics-lib, we parse descriptors using `BufferedReader.readLine()`
 which treats `\n`, `\r`, and `\r\n` all the same.  We may have to write
 our own `readLine()` replacement that only accepts `\n` as line end.

 This may also affect stem's descriptor parser.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5637>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs