Possible security issue
flyingdutchie
Registered Users Posts: 1,286 Major grins
Hello,
I got an answer on my last question on the "APIs, Hacks and Tricks" forum on how to get the original of your image when the gallery is set to not show any originals. The answer was to use the OriginalURL. This gave me the following URL (parts of URL xxxx-ed out).
http://flyingdutchie.smugmug.com/photos/45469061_by3hY-3285xxxxxxxxxxxxxxxxxxxxxxxx00db-2.jpg
I pasted this into my browser (FireFox, IE) and the browser showed me the original image. This is fine, but i was not logged in!
Should the URL above show allow the user to see the original image if the user is not the owner of the image (i.e. the user is not logged in or logged in as someone else)?
I got an answer on my last question on the "APIs, Hacks and Tricks" forum on how to get the original of your image when the gallery is set to not show any originals. The answer was to use the OriginalURL. This gave me the following URL (parts of URL xxxx-ed out).
http://flyingdutchie.smugmug.com/photos/45469061_by3hY-3285xxxxxxxxxxxxxxxxxxxxxxxx00db-2.jpg
I pasted this into my browser (FireFox, IE) and the browser showed me the original image. This is fine, but i was not logged in!
Should the URL above show allow the user to see the original image if the user is not the owner of the image (i.e. the user is not logged in or logged in as someone else)?
I can't grasp the notion of time.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
0
Comments
Medium set in the gallery settings where this image is. This should be a 600x375 image: http://www.smugmug.com/photos/230466181_vo3Sn-O.jpg
The Original size: 4446px x 2780px
Is the url you are using different than the one above? If so, could you email it to the help desk so we can take a look: http://www.smugmug.com/help/emailreal
This URL is obtained by first logging in, then executing the images.getInfo API call (smugmug API) and obtaining the OriginalURL attribute.
http://flyingdutchie.smugmug.com/photos/45469061_by3hY-3285b15d087089c18f10dd2a0eaf00db-2.jpg
The security issue is small, because it is hard to guess the 3285b15... ...00db value, but still... you can get the image even when logged out.
This image above is from a gallery that allows only Large images to be shown: http://www.streetsofboston.com/gallery/994065
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
The URL http://flyingdutchie.smugmug.com/photos/45469061_by3hY-O.jpg gives a Large-sized image
Indeed, the one ending in '-O.jpg' gives you only a large version of the image. But the URL that i posted (the one ending in '00db-2.jpg') gives you the full-sized version.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
www.ivarborst.nl & smugmug
In case dgrin mangled the URL:
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Here is what i get when i use graburl.exe for this image:
graburl is not using any cookies or any caching. It just retrieves the direct http-respsonse.
You'll see the content length is 2,42,662. This is the size of the original image. Removing the -h option downloads the actual original image.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
This is by design. You can only get this URL by authenticating that you are the owner of the image, so there's no security risk unless you spread the URL around yourself. Make sense?
Portfolio • Workshops • Facebook • Twitter
I understand.
Guessing the MD5-sum part of this URL is very tricky. But since all other URL requests are guarded with a login-cookie, why not this one.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Portfolio • Workshops • Facebook • Twitter
Unless someone can demonstrate a CSS (cross site scripting, not cascading style sheets.. ) or similar attack to trick a user into authenticating for the purpose of running the get original url api command, this is a total non-issue in my book.
David
Twitter: @WolfSnap
Facebook: http://www.facebook.com/WolfSnapDesigns
SmugMug & Wordpress Customization - WolfSnap.com | Custom Domains
This is a very good reason!
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
That's right... the chance of someone guessing this URL is really small.
And if someone gets my smugmug credentials, i have more things to worry about than just him/her running the getURLs or getInfo command
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Which brings me to a question: does smugmug limit the number of authentication attempts within a given time period?
David
Twitter: @WolfSnap
Facebook: http://www.facebook.com/WolfSnapDesigns
SmugMug & Wordpress Customization - WolfSnap.com | Custom Domains