Results 1 to 6 of 6

Thread: [RESOLVED] Form Cookies Security

Threaded View

  1. #1

    Thread Starter
    Member LoopUntil's Avatar
    Join Date
    Jul 2008
    Posts
    58

    Resolved [RESOLVED] Form Cookies Security

    Hello all, I want to insert a code in my phpBB2.
    All them are in a TXT file and taken with an array:

    PHP Code:
    $id 23;
    $pass pass.txt;

    if (
    $forum_id == $id) {
            
    $error_login "No permission<br />".
                             
    "<form action='login.php' method=POST><input name='pass' type='pass' /><input type=submit value=verify />".
                             
    "</form>";
            if (!
    in_array($_COOKIE['pass'], file($pass)) message_die(GENERAL_ERROR$error_login);
            
    $file fopen("log.txt""a+");
            
    $log $userdata['user']." IP:".$_SERVER['REMOTE_ADDR']." PASS:".$_COOKIE['pass']."\r\n";
            
    fwrite($file$log);
            
    fclose($file);       


    When an user logins, the password is setted in the cookies and then the ip of the user and the time is stored in the log.txt file.
    It works, but this method is secure?!
    Thanks in advance.
    Last edited by LoopUntil; Jul 21st, 2008 at 03:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width