Changeset 9

Show
Ignore:
Timestamp:
03/12/07 14:41:02 (2 years ago)
Author:
evilbunny
Message:

More new setup fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • EMS/freeauthd.php

    r8 r9  
    414414                        if($secret != "") 
    415415                        { 
    416                                 // New install default, not sure what else to do here.... 
    417 fputs($log, "$secret\n"); 
    418                                 if($secret == "0123456789abcdef") 
     416                                if(checkOTP($user, $output)) 
    419417                                { 
    420                                         fputs($log, date("M j H:i:s")." EMS FreeAuth: Login ok for ".$user."\n"); 
    421                                         $reason = "ACCEPT\n"; 
    422                                         $reply = chr(2); 
    423                                 } else if(checkOTP($user, $output)) { 
    424418                                        fputs($log, date("M j H:i:s")." EMS FreeAuth: Login ok for ".$user."\n"); 
    425419                                        $reason = "ACCEPT\n"; 
     
    592586                if(strlen($otphash) != 16) 
    593587                        return(false); 
     588 
     589                // Treat this as a dummy/testing/initisation code and authenticated true no matter what input. 
     590                if($otphash == "0123456789abcdef") 
     591                        return(true); 
     592 
    594593                $maxperiod = 3; // in minutes +/- 3 minutes 
    595594                $time = round(gmdate("U") / 60);