Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
I'm back.

 
Reply to topic    Forum Index » Bugs and errors View previous topic
View next topic
I'm back.
Author Message
spyce



Joined: 15 Jul 2007
Posts: 14

Post I'm back. Reply with quote
So sorry... haha. But I discovered another fault with the protected post script- though it's probably just minor. As I said before, it works fine- I can create a protected post, enter the password, then view it, without much of a problem. The slight problem is that once the password gets entered just once, the entry remains open for all to see. I only want those who have the password to be able to view the entry, and all others to just be locked out.
Tue Jul 31, 2007 3:01 am View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Are you sure everyone can see it or is it just your cache? Cutenews.ru has leaves you logged in for like a year unless you tell it to log you out.

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Tue Jul 31, 2007 6:08 pm View user's profile Send private message Visit poster's website AIM Address
spyce



Joined: 15 Jul 2007
Posts: 14

Post Reply with quote
No, others can see. I checked from other computers, and I even had a friend check from her computer. She said she could see the entry without having to enter any password.
Tue Jul 31, 2007 9:51 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
In inc/show.news.php change this:
Code:
if (!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))){


to this:
Code:
if ((!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))) or ($row['pass'] != '' and $_COOKIE['protected_'.md5x($row['id'])] != md5x($row['pass']))){

Tue Jul 31, 2007 10:58 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Hm, does that code react like that by default to everyone? I'm gonna play with it cause if not that could be a neat feature to show future articles until you type in their password. I'm not sure what kind of scenario might need that but it might be neat.

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Wed Aug 01, 2007 12:11 am View user's profile Send private message Visit poster's website AIM Address
spyce



Joined: 15 Jul 2007
Posts: 14

Post Reply with quote
FI-DD wrote:
In inc/show.news.php change this:
Code:
if (!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))){


to this:
Code:
if ((!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))) or ($row['pass'] != '' and $_COOKIE['protected_'.md5x($row['id'])] != md5x($row['pass']))){


That worked perfectly. Thank you Smile

scottdallas wrote:
Hm, does that code react like that by default to everyone? I'm gonna play with it cause if not that could be a neat feature to show future articles until you type in their password. I'm not sure what kind of scenario might need that but it might be neat.


Are you talking to me (about the code acting funny)? If so, then I'm going to say that I would assume so, after testing it out on my mom's computer, and trying to have a friend access it, and both receiving the same result.
Wed Aug 01, 2007 12:34 am View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
scottdallas wrote:
Hm, does that code react like that by default to everyone? I'm gonna play with it cause if not that could be a neat feature to show future articles until you type in their password. I'm not sure what kind of scenario might need that but it might be neat.

Yes, the code reacted like this to everyone. Once the corrected password was typed in the unprotected post was cached and available for everyone without entering the password. This is fixed now.
Wed Aug 01, 2007 6:03 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Fixed.. or altered to work differently Razz I think it has potential working in it's 'incorrect' state.

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Wed Aug 01, 2007 9:26 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Bugs and errors All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.