15

\n and \n\r

What a fuckton of issues those two characters brought me today while attempting to verify a signed file.

Comments
  • 5
    Windows vs. TRW
  • 7
    \r\n
  • 3
    \n\r is not used anywhere.
  • 11
    Narrator: And even in a rant the characters \r and \n still gave OP trouble.
  • 1
    CRLF is the only correct line terminator.
  • 3
  • 2
    Generally fuck backslashes.
    Took me like two hours of editing escaped JSON so that it would put a String variable value in there.
  • 1
    @dontbeevil \r\n is only used in text-protocols like http and smtp and Windows-files. \n is used in unix, linux and newer macos. \r is used in older macos-versions.
  • 2
    Ever export to CSV and hit \r\n in what should be an unquoted string? What about a \t or even more rare \v. Sometimes there is a \0 and things go boom.
  • 2
    @bkwilliams \0 is an adversary's best friend, people should know this already, it's only been a used trick for... 30 years or more?
Add Comment