Changeset 65 for trunk/includes


Ignore:
Timestamp:
Feb 5, 2009, 11:03:01 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Kontrola přes haš funkci SHA1 nefungovala všude správně.
Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global.php

    r63 r65  
    157157{
    158158  $_SESSION['User'] = $_POST['LoginUser'];
    159   $_SESSION['Pass'] = sha1($_POST['LoginPass']);
    160 
    161   $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."') AND pass = '".$_SESSION['Pass']."'"));
     159  $_SESSION['Pass'] = $_POST['LoginPass'];
     160
     161  $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."') AND pass = sha1('".$_SESSION['Pass']."')"));
    162162  if(!$Line)
    163163  {
  • trunk/includes/global_function.php

    r63 r65  
    7676    $Pass = $_SESSION['Pass'];
    7777    $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM user WHERE ID = '.$_SESSION['UserID'].'
    78       AND GM >= '.$Licence.' AND pass = "'.$Pass.'"'));
     78      AND GM >= '.$Licence.' AND pass = sha1("'.$Pass.'")'));
    7979    //  echo "SELECT * FROM user WHERE ID = ".$_SESSION['UserID']." AND GM <= $Licence AND pass = '$Pass'";
    8080    return($Line);
Note: See TracChangeset for help on using the changeset viewer.