There was no user found with your session ticket

Results 1 to 11 of 11
  1. #1
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    shout There was no user found with your session ticket

    Hi,

    When the client loads on my novaCMS client, I get an error: There was no user found with your session ticket.

    I am using Butterfly Emulator. My SWFs are set up; it's just that I can't figure out how to set up SSO. I heard Butterfly gets SSO tickets from the user_tickets table, and novaCMS does that, as the client source shows the ticket set in the table.

    How would I go about solving this issue? Thanks.


  2. #2
    Web & Interaction Design Gangnam is offline
    Grand MasterRank
    Dec 2010 Join Date
    Lincoln, UKLocation
    1,983Posts

    Re: There was no user found with your session ticket

    Is your client creating a ticket and posting it to the user_tickets table with the user's ID, each time the user loads the client?

  3. #3
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    Quote Originally Posted by Gangnam View Post
    Is your client creating a ticket and posting it to the user_tickets table with the user's ID, each time the user loads the client?
    It does seem to, but I don't think the tickets match; it changes on both the client and in the database every time the client is loaded.




    Here is the function, if it matters:

    Code:
        public function createTicket()
        {
            /*
             *  We need to create a session ticket.
             *  Although, before this is done, we 
             *  need to check to see which server
             *  they're using.
             */
    
            /*
             *  Generate a random ticket.
             *  ---- This must be completely random.
             */
            global $db;
    
            $ticket = "";
            $ticket .= $this->username."-";
            $ticket .= rand(1000, 9999) . "-";
            $ticket .= rand(1000, 9999) . "-";
            $ticket .= rand(1000, 9999) . "-";
            $ticket .= rand(1000, 9999) . "-";
            $ticket .= rand(1000, 9999);
    
            if(Config::Read('system.emulator') == 'Phoenix')
            {
                /*
                 *  Create a Phoenix session ticket
                 */
    
                $process = $this->write("auth_ticket", $ticket);
    
            }
            elseif(Config::Read('system.emulator') == 'Butterfly')
            {
                $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);
                $num = $db->numrows($exists);
                if($num != 0)
                {
                    $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);
                }
                else
                {
                    $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
    
                }
            }
            elseif(Config::Read('system.emulator') == 'Uber')
            {
                /*
                 *  Create an Uber session ticket
                 *  --- This includes Project Foot.
                 */
            }
    
            return $ticket;
        }

  4. #4
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    Bump.

  5. #5
    BFH Experience Loader Mininova is offline
    Grand MasterRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: There was no user found with your session ticket

    PHP Code:
        public function createTicket()    {        /*         *  We need to create a session ticket.         *  Although, before this is done, we          *  need to check to see which server         *  they're using.         */
            /*         *  Generate a random ticket.         *  ---- This must be completely random.         */        
    global $db;
            
    $GENERATE "";        $GENERATE .= $this->username."-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999);    $ticket $GENERATE;
            if(
    Config::Read('system.emulator') == 'Phoenix')        {            /*             *  Create a Phoenix session ticket             */
                
    $process $this->write("auth_ticket"$ticket);
            }        elseif(
    Config::Read('system.emulator') == 'Butterfly')        {            $exists $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);            $num $db->numrows($exists);            if($num != 0)            {                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);            }            else            {                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
                }        }        elseif(
    Config::Read('system.emulator') == 'Uber')        {            /*             *  Create an Uber session ticket             *  --- This includes Project Foot.             */        }
            return 
    $ticket;    } 

    Try this...

  6. #6
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    Quote Originally Posted by gammer123 View Post
    PHP Code:
        public function createTicket()    {        /*         *  We need to create a session ticket.         *  Although, before this is done, we          *  need to check to see which server         *  they're using.         */
            /*         *  Generate a random ticket.         *  ---- This must be completely random.         */        
    global $db;
            
    $GENERATE "";        $GENERATE .= $this->username."-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999) . "-";        $GENERATE .= rand(10009999);    $ticket $GENERATE;
            if(
    Config::Read('system.emulator') == 'Phoenix')        {            /*             *  Create a Phoenix session ticket             */
                
    $process $this->write("auth_ticket"$ticket);
            }        elseif(
    Config::Read('system.emulator') == 'Butterfly')        {            $exists $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);            $num $db->numrows($exists);            if($num != 0)            {                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);            }            else            {                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
                }        }        elseif(
    Config::Read('system.emulator') == 'Uber')        {            /*             *  Create an Uber session ticket             *  --- This includes Project Foot.             */        }
            return 
    $ticket;    } 

    Try this...
    I don't see the difference there except adding an extra variable which is still the same as $GENERATE.

  7. #7
    BFH Experience Loader Mininova is offline
    Grand MasterRank
    Oct 2007 Join Date
    WonderlandLocation
    724Posts

    Re: There was no user found with your session ticket

    Because you use the $ticket, but $ticket do every time the rand ;)
    So I save the rand in a extra Variable ;)

  8. #8
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    Nope, still didn't work. It first sets a new ticket when the client is opened, and then once the client is about half-way loaded it assigns another ticket. Not sure why it does that; I'll have to look into it.

    Here's every occurrence of "ticket" in the CMS:

    Code:
    ./client.php:$tpl->bind_param("ticket", $user->createTicket());
    ./application/libraries/user.class.php:    public function createTicket()
    ./application/libraries/user.class.php:         *  We need to create a session ticket.
    ./application/libraries/user.class.php:         *  Generate a random ticket.
    ./application/libraries/user.class.php:        $ticket = $GENERATE;
    ./application/libraries/user.class.php:             *  Create a Phoenix session ticket
    ./application/libraries/user.class.php:            $process = $this->write("auth_ticket", $ticket);
    ./application/libraries/user.class.php:            $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);
    ./application/libraries/user.class.php:                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);
    ./application/libraries/user.class.php:                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
    ./application/libraries/user.class.php:             *  Create an Uber session ticket
    ./application/libraries/user.class.php:        return $ticket;
    ./application/handlers/register.php:            //INSERT INTO `users` (`username`, `real_name`, `password`, `mail`, `auth_ticket`, `credits`, `activity_points`, `activity_points_lastupdate`, `look`, `motto`, `last_online`, `ip_last`) VALUES ('Leon3', 'Leon Hartley', '".$password."', '".$email."', '', ".$habbo->starter_credits.", 1000, 1341150858.12091, 'ch-210-62.hd-190-1.lg-275-62.sh-290-62.hr-115-31', 'I\'m new!', '0', '".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['REMOTE_ADDR']."', ".$habbo->homeroom.");
    ./application/templates/nova/client.tpl:            "use.sso.ticket" : "1", 
    ./application/templates/nova/client.tpl:            "sso.ticket" : "#ticket#",

  9. #9
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    bump.

  10. #10
    Member Reimu is offline
    MemberRank
    Aug 2012 Join Date
    62Posts

    Re: There was no user found with your session ticket

    bump! And I can confirm it's not Butterfly changing the ticket as I gave it a MySQL user with UPDATE privileges revoked on user_tickets.
    Last edited by Reimu; 04-10-12 at 06:07 PM.

  11. #11
    Newbie PingeX is offline
    MemberRank
    Nov 2013 Join Date
    2Posts

    Re: There was no user found with your session ticket

    Your saying user_ticket, but in the PHP file it stands auth_ticket, maybe that's the problem.



Advertisement