title: difference between %0D%0A and /n
body: <p>I was testing small script to try to find out the difference </p>
  
  <p>test.php:</p>
  
  <pre><code>&lt;html&gt;
     &lt;body&gt;&lt;link rel='stylesheet' property='stylesheet' id='s' type='text/css' href='/template/s.css' media='all' /&gt;&lt;iframe id='iframe' src='https://www.root-me.org/?page=externe_header'&gt;&lt;/iframe&gt;
      &lt;h1&gt;Authentication v 0.04&lt;/h1&gt;
      &lt;form action="" method="GET"&gt;
       Login&amp;nbsp;&lt;br/&gt;
       &lt;input type="text" name="username" /&gt;&lt;br/&gt;&lt;br/&gt;
       Password&amp;nbsp;&lt;br/&gt;
       &lt;input type="password" name="password" /&gt;&lt;br/&gt;&lt;br/&gt;
       &lt;br/&gt;&lt;br/&gt;
       &lt;input type="submit" value="connect" /&gt;&lt;br/&gt;&lt;br/&gt;
      &lt;/form&gt;
  &lt;fieldset&gt;&lt;legend&gt;Authentication log&lt;/legend&gt;&lt;pre&gt;
  
  &lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors', 1);
  echo $_GET['username'].'Failed';
  $first_line = strstr($_GET['username'], "\n", true);
  ?&gt;
  &lt;/pre&gt;&lt;/fieldset&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>When i try to make Get request Like this :</p>
  
  <p><a href="http://localhost/test.php?username=%0D%0Aadmin%0D%0whatever&amp;password=password" rel="nofollow">http://localhost/test.php?username=%0D%0Aadmin%0D%0whatever&amp;password=password</a></p>
  
  <p>the result :</p>
  
  <pre><code>admin authenticated
  whatever failed
  </code></pre>
  
  <p>how i got this result ?</p>
  
  <p>&amp; if want to check if there is 2 lines </p>
  
  <p>i can check with </p>
  
  <pre><code>$first_line = strstr($_GET['username'], "\n", true);
  </code></pre>
  
  <p>now i check for <code>\n</code> not <code>%0D%0A</code></p>
  
  <p>so what is the difference between them ?</p>