Security Issue on Protected Galleries ...

Antonio CorreiaAntonio Correia Registered Users Posts: 6,241 Major grins
edited May 18, 2006 in SmugMug Support
Hello

I cleaned my cookies and tryed to access a protected gallery.

After I input the password fot this gallery several cookies were created (See attachment). Password is in plain text !! if you use one computer everybody will be able to see you gallery password. Even you gallery id is displayed.

To solve this problem: I would advise in creating a SESSION variable and encrypted, if you close your browser the session will expire automatically.

See http://php.net/manual/en/ref.session.php

ps - I changed the gallery password ...
All the best ! ... António Correia - Facebook

Comments

  • Antonio CorreiaAntonio Correia Registered Users Posts: 6,241 Major grins
    edited May 17, 2006
  • DodgeV83DodgeV83 Registered Users Posts: 379 Major grins
    edited May 17, 2006
    I just confirmed this on my system too...a major oversight if you ask me. Session cookies don't fix the problem in my book, because I'd still like the password to be saved on the computer for my guests, JUST NOT IN PLAINTEXT! :wow
  • CasonCason Registered Users Posts: 414 Major grins
    edited May 17, 2006
    They just need to implement a stronger encryption algorithm "hashing". Easier said than done.

    I'm sure the engineers will find a solution.
    Cason

    www.casongarner.com

    5D MkII | 30D | 50mm f1.8 II | 85mm f1.8 | 24-70mm f2.8
    L | 70-200mm f2.8L IS II | Manfrotto 3021BPRO with 322RC2
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 17, 2006
    RTP wrote:
    They just need to implement a stronger encryption algorithm "hashing". Easier said than done.

    I'm sure the engineers will find a solution.
    umm hashing isn't encryption. Hashing is a one-way irreverisble function.
    David Parry
    SmugMug API Developer
    My Photos
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 18, 2006
    Antonio, we appreciate your post. Hang in there, we're listening.
  • CasonCason Registered Users Posts: 414 Major grins
    edited May 18, 2006
    devbobo wrote:
    umm hashing isn't encryption. Hashing is a one-way irreverisble function.

    So you are saying it is not the same? eek7.gif

    You are encrypting the password with "one-way hashing". You type the password. It's hashed out into some garbage text and stored in the cookie. Then, the user comes back and types the password. That password is hashed out during the session and checked against the content stored in the cookie. If they match, then you are in.

    Is that not encrypting the password?
    Cason

    www.casongarner.com

    5D MkII | 30D | 50mm f1.8 II | 85mm f1.8 | 24-70mm f2.8
    L | 70-200mm f2.8L IS II | Manfrotto 3021BPRO with 322RC2
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 18, 2006
    RTP wrote:
    So you are saying it is not the same? eek7.gif

    Yes I am saying they are not the same.

    RTP wrote:
    Is that not encrypting the password?
    No, encrypting something implies there is a method to retrieve the original text from the encrypted text by the means of a key. Since, a hashing algorithm is a one-way function, you require the original text to verify the hash value, hence it's not encryption.
    David Parry
    SmugMug API Developer
    My Photos
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 18, 2006
    devbobo wrote:
    No, encrypting something implies there is a method to retrieve the original text from the encrypted text by the means of a key.
    or keys
    Pedal faster
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 18, 2006
    Typically, hashs are used for authentication or non-repudiation.

    The example you mentioned above with hashing the password into a cookie is one such example.

    Another example is digital signatures on email. The email message is hashed, and the hash value appended to the message. On opening the message, the recepient's email client hashs the message and compares it to the hash value attached to the email to determine if the message was modified in transit.
    David Parry
    SmugMug API Developer
    My Photos
  • CasonCason Registered Users Posts: 414 Major grins
    edited May 18, 2006
    Got it. thumb.gif
    Cason

    www.casongarner.com

    5D MkII | 30D | 50mm f1.8 II | 85mm f1.8 | 24-70mm f2.8
    L | 70-200mm f2.8L IS II | Manfrotto 3021BPRO with 322RC2
  • Antonio CorreiaAntonio Correia Registered Users Posts: 6,241 Major grins
    edited May 18, 2006
    It works fine now.
    Nice work.
    SmugMug has an added value.
    Thank you. thumb.gif
    All the best ! ... António Correia - Facebook
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited May 18, 2006
    RTP wrote:
    So you are saying it is not the same? eek7.gif

    You are encrypting the password with "one-way hashing". You type the password. It's hashed out into some garbage text and stored in the cookie. Then, the user comes back and types the password. That password is hashed out during the session and checked against the content stored in the cookie. If they match, then you are in.

    Is that not encrypting the password?

    Not only is that not encrypting, it's also not enhancing security at all.

    If someone can view your cookies, they can just copy the hashed string and it would act exactly the same as if they had typed the password.

    Don
  • luke_churchluke_church Registered Users Posts: 507 Major grins
    edited May 18, 2006
    onethumb wrote:
    it's also not enhancing security at all.

    Don,

    As I'm sure you're more than well aware :): :

    The only advantage it gives you is if people re-use passwords for other purposes, they can't be [easily] extracted if the machine is compromised.

    I agree that password resuse is not generally a good idea for 'shared access control' passwords, but I bet it happens.

    Luke
Sign In or Register to comment.