vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Reverse Authentication (https://vborg.vbsupport.ru/showthread.php?t=234050)

iwpg 01-24-2010 06:20 PM

Reverse Authentication
 
Hello!

I am having a very difficult time with authentication running on 2 platforms, Vbulletin, and DZOIC Handshakes.

Hoping that someone could come up with a MOD to use dzoic's login credentials (instead of Vbulletin's) based on cookies. Authentication would check dzoic's database, not vbulletin's for proper login.

Example pages:
http://www.financeglobe.com/SocialNet/forum/
http://www.financeglobe.com/SocialNet/

Many thanks,

Mike

--------------- Added [DATE]1264365448[/DATE] at [TIME]1264365448[/TIME] ---------------

I forgot to tell everyone how it is currently running:

The user will login to the dzoic script, and that stores a cookie for the credentials, and loads the login.php for the forum, and logs the user in for vbulletin.

The issue with this is that changing passwords has been a headache, as well as having 2 different login cookies makes it very difficult to manage. At times, the forum will log the user out because a session or cookie expired, while keeping the user logged into dzoic. This makes the user logged into one, but not the other.

iwpg 01-26-2010 11:55 PM

This is what I have so far to log in to Vbulletin from an external script. The salt system is not working, not really sure how to put it together. Anyone please?

Code:

function vbulletin_login($values){

$email = $values["username"];
$password = $values["password"];

//Get the url parameters and then sql escape them to prevent sql injections
$userin = mysql_real_escape_string($email);
$passin = mysql_real_escape_string($password);

// Query to pull out the salt value for the given user
$fetchrows = mysql_query("select * from vbuser WHERE username ='$userin'");
$r = @mysql_fetch_array($fetchrows);
$userpass = $r["password"];
$userid = $r["userid"];
$substatus = $r["usergroupid"];
$salt = $r["salt"];
define('COOKIE_SALT', 'LICENSE KEY HERE');               
                       
$fetchrowss = mysql_query("select * from vbsession WHERE userid ='$userid'");
$s = @mysql_fetch_array($fetchrowss);
$sessionhash = $s["sessionhash"];
                       
setcookie("fnfuserid", $userid, time()+(60*60*24*365), "/", ".financeglobe.com", 1);
setcookie("fnfpassword", md5($password . COOKIE_SALT), time()+(60*60*24*365), "/", ".financeglobe.com", 1);
setcookie("fnfsessionhash", $sessionhash, time()+(60*60*24*365), "/", ".financeglobe.com", 1);

}//vbulletin_login


iwpg 02-05-2010 10:44 PM

Anybody please? :confused:


All times are GMT. The time now is 12:09 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.00978 seconds
  • Memory Usage 1,726KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete