vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Requring members to input a password EACH session to view a forum (https://vborg.vbsupport.ru/showthread.php?t=259075)

Wonksta 02-18-2011 10:59 AM

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!

kh99 02-18-2011 01:21 PM

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.

Wonksta 02-18-2011 01:36 PM

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!

kh99 02-18-2011 01:42 PM

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?

Lynne 02-18-2011 03:45 PM

When you change it from 1 to 0, you will then need to clear your own cookies initially to see if it works.

Wonksta 02-18-2011 08:55 PM

Quote:

Originally Posted by Lynne (Post 2164005)
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!

Lynne 02-19-2011 03:53 AM

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.

christon26 02-21-2011 06:53 PM

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

Wonksta 02-24-2011 02:09 PM

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! :)

Lynne 02-24-2011 02:34 PM

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.


All times are GMT. The time now is 10:52 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.01014 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete