Results 1 to 10 of 10

Thread: hey!! i am unable to edit the PETs I have submitted!!

  1. #1

    hey!! i am unable to edit the PETs I have submitted!!

    Any idea why?

  2. #2

    Re:hey!! i am unable to edit the PETs I have submitted!!

    You've been a bad boy? :P

  3. #3

    Re:hey!! i am unable to edit the PETs I have submitted!!

    ... Have you been talking to my wife??

  4. #4
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:hey!! i am unable to edit the PETs I have submitted!!

    It's the cookies. The new version of Yabb has a different cookie format and the PET script is written using the old format. I will fix it in the next couple of days.

  5. #5

    Re:hey!! i am unable to edit the PETs I have submitted!!

    ah - blame it on the cookies! ;D

  6. #6
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:hey!! i am unable to edit the PETs I have submitted!!

    This turns out to be a tougher problem than I thought.
    The yabbse code is written in PHP, the PET script in Perl.
    The new yabbse version scrambles the username and password and send it to the user in a cookie. I found this line in the yabbse code that looks like the one that unscrambles the cookie:
    Code:
    list($username, $password) = @unserialize(stripslashes($_COOKIE[$cookiename]));
    The $_COOKIE[$cookiename] variable looks something like this:
    Code:
    a%3A2%3A%7Bi%3A0%3Bs%3A0%3A%2248%42%3Bi%3A1%3Bs%3A32%3A%22531f7423f0d1146bece3f7b5c1a10a36%22%3C%7D
    which is the value of the scrambled cookie.
    Now both unserialize and stripslashes are built-in PHP functions. To get the PET script working again I need to get the $username variable somehow. The question is is there an equivalent function in Perl for both unserialize and stripslashes or can a little PHP script written to unscramble the cookie and pass the value of $username to the PET script?

    PHP gurus please help me out ...

  7. #7

    Re:hey!! i am unable to edit the PETs I have submitted!!

    strip slashes should be as simple as s/\\([^\\])/$1/g

    if you decoded the cookie thing with normal %XX == chr(0xXX) it comes out like
    a:2:{i:0;s:2:"79";i:1;s:32:"ENCRYPT ED PASSWORD";}

    i think 79 is my user id?

    and the 79 isn't encoded so you could just do a /%22(.*?)%22.*?%22(.*?)%22/
    then userid is in $1 and encrypted password in $2


    assuming 79 is my id....

  8. #8
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:hey!! i am unable to edit the PETs I have submitted!!

    Thank you gorn, I was hoping you could help. I think I got it working. Could you guys check to see if it's working for you?

  9. #9

    Re:hey!! i am unable to edit the PETs I have submitted!!


  10. #10

    Re:hey!! i am unable to edit the PETs I have submitted!!

    Is it the cookies' fault that my name doesn't show correctly on my Wireless PET too? Guess it would since the old cookie tried to register with the new system. :P

Similar Threads

  1. PETs: Kppp and Subwoofer
    By horus in forum Linux - General Topics
    Replies: 1
    Last Post: 10-14-2006, 03:43 PM
  2. HOW TO: Edit the Boot.ini File
    By CoolJsa14 in forum Windows - General Topics
    Replies: 0
    Last Post: 01-05-2005, 08:27 PM
  3. Edit the Boot.ini File in Windows XP
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-04-2005, 06:21 AM
  4. Unable to Connect to Stand-Alone SQL Server
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-01-2005, 08:41 PM
  5. Praise for MC Edit
    By cga in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 12-02-2001, 12:34 PM

Bookmarks

Posting Permissions

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