+ Reply to Thread
Results 1 to 9 of 9

Thread: Login Browser Security Issues

  1. #1
    masterjake is offline x10Hosting Member masterjake is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    73

    Exclamation Login Browser Security Issues

    My site is http://masterjake.co.nr/. For some reason, for people to login, they have to either have their privacy level on low or my site in their allow list. I put a tutorial on the login page on how to lower your security or allow my site but can someone help me with a login system that doesn't require low browser security. Thanks!

  2. #2
    conker87 is offline x10Hosting Member conker87 is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    65

    Re: Login Browser Security Issues

    What is the code that you're using to login? I can see it's php, but can you post the code?

  3. #3
    masterjake is offline x10Hosting Member masterjake is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    73

    Exclamation Login Browser Security Issues - The Code

    I have a page called login.php with a form on it. The action of the form goes to a page called do_login.php?login=yes where everything takes place. This is the do_login code:

    ------------------------------------------------------------------------
    <?php session_start(); ?>
    <?php
    $username=$_POST['username'];
    $password=$_POST['password'];
    $login=$_GET['login'];
    if ($login=='yes') {
    $con = mysql_connect('localhost','my_user_here','my_pass_ here');
    mysql_select_db('my_db_here');
    $get = mysql_query("Select count(id) FROM users WHERE username='$username' AND password='$password'");
    $result = mysql_result($get,0);

    if ($result != 1) {

    header ("Location: login_failed.php");
    }else{

    $_SESSION['username']=$username;
    header ("Location: login_success.php");
    }

    }
    ?>
    ------------------------------------------------------------------------

  4. #4
    mr kennedy's Avatar
    mr kennedy is offline KENNNNNEEEEDYYY!!!! mr kennedy is an unknown quantity at this point
    Join Date
    Aug 2007
    Location
    Doha, State of Qatar
    Posts
    525

    Re: Login Browser Security Issues

    you have the php header at the wrong location :p

    should be like this:
    <?php

    <?php session_start(); ?>
    $username=$_POST['username'];
    $password=$_POST['password'];
    $login=$_GET['login'];
    if ($login=='yes') {
    $con = mysql_connect('localhost','my_user_here','my_pass_ here');
    mysql_select_db('my_db_here');
    $get = mysql_query("Select count(id) FROM users WHERE username='$username' AND password='$password'");
    $result = mysql_result($get,0);

    if ($result != 1) {

    header ("Location: login_failed.php");
    }else{

    $_SESSION['username']=$username;
    header ("Location: login_success.php");
    }

    }


    ?>

    you should have the <?php before your php codes...

  5. #5
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Login Browser Security Issues

    There is nothing wrong with his php headers. He already does have <?php tags in case you haven't noticed and there is nothing wrong with multiple <?php ?>s.
    Apart from relative URL's in the header bits I can't see much that's wrong.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  6. #6
    masterjake is offline x10Hosting Member masterjake is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    73

    Exclamation Re: Login Browser Security Issues

    Yeah theres nothing wrong with multiples, that code you posted didn't really work. Thanks for your help though. Browser security on medium protects people from logging into sites with content that is able to be dangerous to them i guess. Is it because my database stores their ip when they register? Is that why the can't login because it retrieves that from the database somehow?

  7. #7
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Login Browser Security Issues

    No, database logging is fine, in fact most systems use databases to store member information.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  8. #8
    masterjake is offline x10Hosting Member masterjake is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    73

    Exclamation Re: Login Browser Security Issues

    Yeah I like the my database. I just don't understand. Every browser will allow people to login fine except Internet Explorer. On it, you have to lower your security or add me to your allow list. I just don't get why that happens.

  9. #9
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: Login Browser Security Issues

    You could try echoing a meta redirect if the header information is the problem like this:
    PHP Code:
    if ($result != 1
    {
        echo 
    '<meta http-equiv="refresh" content="0;URL=login_failed.php" />';
    }
    else
    {
        
    $_SESSION['username']=$username;
        echo 
    '<meta http-equiv="refresh" content="0;URL=login_success.php" />';

    But I don't think any of this should mater, becouse this is a server side script and has nothing to do with the clients security level.
    Last edited by Thewinator; 11-11-2007 at 05:32 AM.



+ Reply to Thread

Similar Threads

  1. The previous way of login?
    By halchalgroups in forum Free Hosting
    Replies: 1
    Last Post: 09-22-2007, 02:07 AM
  2. Control Panel Login Issues?
    By ShoutX in forum Free Hosting
    Replies: 2
    Last Post: 09-19-2007, 08:21 PM
  3. Replies: 0
    Last Post: 08-27-2005, 03:12 PM
  4. Security hole bites Apple's Tiger
    By stealth_thunder in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 05-11-2005, 09:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers