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. TROUBLESHOOT: "Unable to open initial console"...PC UNABLE TO BOOT IN LINUX
    By sandeepundale in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 08-17-2006, 08:30 PM
  2. M$ PETS
    By elovkoff in forum General Chat
    Replies: 3
    Last Post: 11-06-2004, 07:08 AM
  3. Edit my PET?
    By Pleiades in forum Linux - General Topics
    Replies: 2
    Last Post: 08-08-2002, 04:12 PM
  4. Submitted all my drafs to the PET section
    By in forum Linux - General Topics
    Replies: 1
    Last Post: 07-04-2002, 11:23 PM
  5. Replies: 17
    Last Post: 01-16-2002, 11:38 AM

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
  •