Changeset 1408 in ExiteCMS for branches/PLi-Fusion/includes/user_functions.php
- Timestamp:
- 05/15/08 22:25:54 (4 years ago)
- File:
-
- 1 edited
-
branches/PLi-Fusion/includes/user_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/PLi-Fusion/includes/user_functions.php
r1343 r1408 42 42 43 43 // Login code 44 if (isset($_POST['login']) ) {45 $user_pass = md5( $_POST['user_pass']);44 if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) { 45 $user_pass = md5(md5($_POST['user_pass'])); 46 46 $user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($_POST['user_name'])); 47 // double hashed passwords as of revision 95448 if ($settings['revision'] >= 954) {49 $user_pass = md5($user_pass);50 }51 47 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND user_password='".$user_pass."'"); 52 48 if (dbrows($result) != 0) { … … 85 81 } 86 82 } else { 87 redirect(BASEDIR."setuser.php?error=3" );83 redirect(BASEDIR."setuser.php?error=3", "script"); 88 84 exit; 89 85 } … … 365 361 366 362 if (iSUPERADMIN) { 367 $res .= ($hidden == false?" AND ":"")."($field != '100'"; 363 $res .= ($res != ""?" AND ":"")."$field != '100'"; 364 return $res; 368 365 } elseif ($userdata['user_level'] >= 102) { 369 366 $res .= ($hidden == false?" AND ":"")."($field='0' OR $field='101' OR $field='102'";
Note: See TracChangeset
for help on using the changeset viewer.
