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

[tor-bugs] #5733 [HTTPS Everywhere: Chrome]: default.rulesets is obfuscated by not having line terminators



#5733: default.rulesets is obfuscated by not having line terminators
------------------------------------------+---------------------------------
 Reporter:  cypherpunks                   |          Owner:  pde
     Type:  defect                        |         Status:  new
 Priority:  normal                        |      Milestone:     
Component:  HTTPS Everywhere: Chrome      |        Version:     
 Keywords:  lf cr crlf linebreak newline  |         Parent:     
   Points:                                |   Actualpoints:     
------------------------------------------+---------------------------------
 HTTPS Everywhere 2012.5.1_1, running in Chromium on linux. I wanted to
 alter a rule without making a wholly new one.[[BR]]
 [[BR]]
 default.rulesets is ''impossible'' to parse with human eyes. The lines
 have no line terminators so it's all in just one incredibly long string;
 '''*literally*''' a wall of text.

 As an exception a small number of lines end in the long-deprecated
 '''CR''' terminator (carriage return), as for instance Macs used ''pre-
 OSX'' before changing to the Unix standard '''LF''' (linefeed).
 DOS/Windows use '''CRLF''', which is why files saved under Unix-like OSs
 don't work well with notepad. Please see the Wikipedia page on newlines
 for more information.[[BR]]
 >[https://en.wikipedia.org/wiki/Newline][[BR]]
 [[BR]]
 File description;[[BR]]
 {{{
 2012.5.1_1/rules$ file default.rulesets
 default.rulesets: UTF-8 Unicode text, with very long lines, with no line
 terminators
 }}}
 Count of lines and characters;[[BR]]
 {{{
 2012.5.1_1/rules$ wc -lc < default.rulesets
       1 1107900    # ergo 1 line of more than a million charactes
 }}}
 Count of occurences of CR and LF respectively;[[BR]]
 {{{
 2012.5.1_1/rules$ od -a < default.rulesets | grep -o cr | wc -l
 145                # 145 CR occurences *total*
 2012.5.1_1/rules$ od -a < default.rulesets | grep -o lf | wc -l
 0                  # 0 LF
 }}}
 [[BR]]
 [[BR]]
 Regardless of which scheme to follow (Unix LF, DOS CRLF, old-old CR) there
 should naturally be one linebreak per line.[[BR]]
 [[BR]]
 [[BR]]
 (Incidentally I used [[ BR ]] to break lines in this post, so if it ends
 up looking really weird let's all chuckle at the irony!)[[BR]]

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5733>
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