Puzzler... Works in IE, but not FF....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manguish
    Senior Member
    • Jan 2004
    • 361

    Puzzler... Works in IE, but not FF....

    I have the following authentication script which works perfectly in IE, but not in FF.

    If anyone would be so kind to cast an eye over it and see any potential faults - i'd be so grateful.

    PHP Code:
    <?php

    // ####################### SET PHP ENVIRONMENT ###########################
    error_reporting(E_ALL & ~E_NOTICE);

    // #################### DEFINE IMPORTANT CONSTANTS #######################
    define('NO_REGISTER_GLOBALS'1);
    define('SESSION_BYPASS'1);
    define('LOCATION_BYPASS'1);
    define('THIS_SCRIPT''chat_auth');

    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    $phrasegroups = array();
    $specialtemplates = array();
    $globaltemplates = array();
    $actiontemplates = array();

    // ######################### REQUIRE BACK-END ############################
    require_once('./global.php');

    // #######################################################################
    // ######################## START MAIN SCRIPT ############################
    // #######################################################################
    globalize($_GET, array('username' => STR,'password' => STR));

    if (
    $username == '')
    {
        die(
    '0');
    }

    // get userid for given username
    if ($bbuserinfo $DB_site->query_first('SELECT userid, usergroupid, membergroupids, username, password, salt FROM ' TABLE_PREFIX 'user WHERE username = "' addslashes(htmlspecialchars_uni($username)) . '"'))
    {
        if (
    $bbuserinfo['password'] != md5(md5($password) . $bbuserinfo['salt']))
        {
            
    //bad password
            
    die('0');
        }
        else
        {
            
    //is used activated?
            
    if ( $bbuserinfo['usergroupid'] == || $bbuserinfo['usergroupid'] == 
            {
                die(
    '0');
            }

            
    //is user banned?
            
    if ( $bbuserinfo['usergroupid'] == 
            {
                die(
    '0');
            }

            
    //is the user an admin / super mod?
            
    if ( $bbuserinfo['usergroupid'] == || $bbuserinfo['usergroupid'] == 
            {
                die(
    '2');
            }

            
    //user is regular user
            
    die('1');
        }
    }
    else
    {
        
    //bad username
        
    die('0');
    }

    ?>
    For all your minimoto needs : www.minimotoclub.com
  • Reven
    New Member
    • Aug 2005
    • 10
    • 3.6.x

    #2
    The only possible problem I can see is in differences in the way the $_GET data is transmitted in both browsers. Try using $_GET['username'] and $_GET['password'] (within stripslashes() and htmlspecialchars_uni() of course) instead of the globalized ones. Don't see how it could make a difference, but it's the only possible difference I can think of between Firefox and IE.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...