Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2011, 10:59 AM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Requring members to input a password EACH session to view a forum

Hi guys

I was really hoping someone could help me, I have a forum which is private and deals with a very personal topic which members do not want their husbands or wives finding out about (depression etc)

At the moment it seems like if I set the password for Forum A once the user inputs the password and closes the browser and reopens it, it does not ask for the password to be entered in. I would prefer it ASK to re enter the password each time the browser is reopened heck I wouldn't even mind having to enter it every time someone wanted to view the forum.

Secondly a way to prevent browsers from saving the password?

Tahnks so much!
Reply With Quote
  #2  
Old 02-18-2011, 01:21 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like forum passwords are saved in cookies with long expiration times, and the cookie name is COOKIE_PREFIX . 'forumpwd'. So you might be able to make a plugin that deletes that value from $_COOKIES early on, like in global_start or something. But I think that might result in a user having to enter a password every time they click on anything in a password-protected forum, which might be too much.

I think if you had the cookie saved with an expiration time of 0 then it would only last until the browser was closed, which sounds more like what you want. In forumdisplay.php around line 140 there's this code:

Code:
// set a temp cookie for guests
if (!$vbulletin->userinfo['userid'])
{
    set_bbarray_cookie('forumpwd', $foruminfo['forumid'], md5($vbulletin->userinfo['userid'] . $vbulletin->GPC['newforumpwd']));
}
else
{
    set_bbarray_cookie('forumpwd', $foruminfo['forumid'], md5($vbulletin->userinfo['userid'] . $vbulletin->GPC['newforumpwd']), 1);
}
and that '1' as the last parameter in the else means that the cookie will not be temporary. So you could edit that file and take out the 1 (or really just comment out everything except the first call to set_bbarray_cookie()) and that might do what you want. (There may or may not be some way to get the same result though plugins, I don't know).

BTW, I haven't actually tried any of this.
Reply With Quote
  #3  
Old 02-18-2011, 01:36 PM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried changing the 1 to 0 nothing changed.

I had a look at the Cookie bbforumpwd is what set in the Cookie

Thanks so much for your reply kh99!
Reply With Quote
  #4  
Old 02-18-2011, 01:42 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On second thought, I think my first idea about deleting the cookie might result in not being able to use the forum at all.

Changing the 1 to 0 I thought should have made it so that if you closed the browser and opened a new one, you had to enter the password again. Did you try that? Maybe I'm wrong...

But I didn't really understand your last post - did you solve your problem?
Reply With Quote
  #5  
Old 02-18-2011, 03:45 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you change it from 1 to 0, you will then need to clear your own cookies initially to see if it works.
Reply With Quote
  #6  
Old 02-18-2011, 08:55 PM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
When you change it from 1 to 0, you will then need to clear your own cookies initially to see if it works.
Hey guys thanks so damn much it seems to be asking for a password each time the browser is restarted, love it!

I just forgot to clear ALL cookies :P

One final question, how can I make sure the password field doesn't get prompted to be saved on entry by the browsers? Just like for entering your bank password it never promts for the password to be saved.


Again thanks so much!
Reply With Quote
  #7  
Old 02-19-2011, 03:53 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know that you can do that. There are so many addons out there to save information you input into textareas - not just username/password fields.
Reply With Quote
  #8  
Old 02-21-2011, 06:53 PM
christon26 christon26 is offline
 
Join Date: Dec 2008
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know vbulletin.com has the members area so that the password can't be saved (at least on my browser it won't LOL)...the only thing I can find on it is to add autocomplete="off" to the input code like so:

<input type="password" name="password" id="password" autocomplete="off" />

I don't know if this is the only part that disables the password being saved, but worth a try

Hope it helps anyway lol

Lissa
Reply With Quote
  #9  
Old 02-24-2011, 02:09 PM
Wonksta Wonksta is offline
 
Join Date: Apr 2009
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting mate! Which template do I find that string I did a search via Search in Templates for keyword 'password' all of it doesn't seem relevant, thanks!

Lynne: I noticed that as the Admin/Super Admin I am not forced to enter the password, ever. Is there anyway to make it so that Admins, Mods and Super admins are forced to enter the password each session?

Thanks so much!
Reply With Quote
  #10  
Old 02-24-2011, 02:34 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would need to edit the actual php code to make it so everyone, including admins/mods, would have to enter a password. Check the function verify_forum_password and you should find the code.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04177 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete