PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Bug Reports (http://www.photopost.com/forum/photopost-pro-bug-reports/)
-   -   5.31 stripimages displays privates photos (http://www.photopost.com/forum/photopost-pro-bug-reports/127015-5-31-stripimages-displays-privates-photos.html)

Astaran September 2nd, 2006 03:51 PM

5.31 stripimages displays privates photos
 
Under certain circumstances, the private images are displayed on the image strip on showphoto.php.

- the first photo of the image strip has to be a non private image

The next two photos are displayed regardless if they're private or not.

Code in showphoto.php:
Code:

Content visible to verified customers only.
As you can see, the "grab two more" part isn't checking if the image is private or not.

Chuck S September 3rd, 2006 09:25 AM

Yes I can understand your philosophy here but this will require some extensive testing to answer. I have done some testing and thus far the only way I can see a private image is if I am logged in as admin which means things are working as they should be since admin sees everything.

Astaran September 3rd, 2006 10:12 AM

Ok, thanks. I know that an admin can see private images, but this happens for normal users and non authenticated users.

Instructions on how to reproduce this bug:

- upload two images to a private album
- upload an image to a public viewable category
- go to the frontpage of photogallery with a normal user account or as an non authenticated user. On the "new photos" strip, the two private images won't show up (as wanted), but the last uploaded image will.
- Click on that image to view it.
- Have a look at the image strip. The thumbnails of the two private images will show up there. Clicking on one of them will bring up the "You need a password to view this image" screen. But from my understanding, the thumbnails of the private images should not be visible.

Let me know if you can reproduce this with the above instructions. If not, I can provide you access to my test installation. To fix this, the "grab to more part" would also need an is_image_private() call.

Chuck S September 3rd, 2006 10:45 AM

Try this instead

Code:

Content visible to verified customers only.

Astaran September 3rd, 2006 11:22 AM

Unfortunately, it's not that easy. Your fix will make the image strip disappear completely. The problem is that you need to fetch additional rows if the images are private as long as you got two non private images and then do the the "break".

Chuck S September 3rd, 2006 01:34 PM

Code:

Content visible to verified customers only.

Astaran September 3rd, 2006 01:49 PM

That fixed it, thanks!

Astaran September 3rd, 2006 02:00 PM

Sorry, a bit to early. With your latest fix, the number of photos shown in the image strip will decrease if a private images are in the mysql result set.

See here (4 photos should be displayed):
1 private image -> http://fotogalerie.herr-der-ringe-fi...0/limit/recent
2 private images -> http://fotogalerie.herr-der-ringe-fi...9/limit/recent
no private images -> http://fotogalerie.herr-der-ringe-fi...5/limit/recent

Michael P September 3rd, 2006 03:30 PM

I can see that we'll need to loop for checking is_image_private and ending when we run out of images or we get two more..

Astaran September 4th, 2006 03:27 AM

Sounds good!
Will you post a small notice when this has been fixed? Either with the updated code or that I can grab the latest version from the member area?
Thanks!

DavidMacLean September 10th, 2006 07:45 PM

Aw heck.

I was looking for a fix to keep private photos out of the "most recent" gadget on the index page. I see now the problem goes deeper.

So what do I do now with my users? Cut their privates off, or expose their privates?

It's not pretty !!

Chuck S September 10th, 2006 07:53 PM

David no this discussion is about the next prev strip on showphoto.

The feature blocks on the index correctly show images a user has permission to see.


All times are GMT -5. The time now is 11:27 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97