Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is this code vunerable to \0 php
  2. if (file_exists('controllers/' . $controller . '.php'))
  3.        
  4. $_action = ( (isset($_GET['r']) && ctype_alnum($_GET['r'])) ? $_GET['r'] : $_default );
  5.        
  6. php > $a = "abcdef";
  7. php > echo strlen($a);
  8. 7
  9.        
  10. $tmp_name = "some random value";
  11. if (!file_exists($tmp_name)) {
  12.     file_put_contents($tmp_name, "something very critical");
  13. }