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 01-21-2007, 08:30 PM
Sykoi Sykoi is offline
 
Join Date: Dec 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Best method of identifying users from the db?

I need to find a method to confirm a user is who they say they are from another site, by checking the vB_user table, from a site outside of vBulletin's architecture... Now I was going to have them enter their user id, and a hidden profile key they pick themselves, but I'm not sure if this is such a great idea... What would be a good idea?

Could I just confirm it with id, md5(md5(password,$salt)) or whatever password protection method vBulletin uses?
Reply With Quote
  #2  
Old 01-21-2007, 09:25 PM
Attilitus's Avatar
Attilitus Attilitus is offline
 
Join Date: Mar 2005
Posts: 393
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well additional information would be useful. Such as the degree of access that you have to the external database.
Reply With Quote
  #3  
Old 01-21-2007, 09:28 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check their username/password against the vB. database.

select userid
from user
where username = 'usetname sent' and password = md5(concat(md5('password sent'), salt));
Reply With Quote
  #4  
Old 01-21-2007, 09:31 PM
Sykoi Sykoi is offline
 
Join Date: Dec 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So...
PHP Code:
SELECT from vb3_user WHERE userid=### AND password=md5(concat(md5(password),vb3_user.salt)) 
Is this correct? Or are you referring to php functions of md5/concat and not mysql (Is concat even in mysql...?)

And as for the extent at which I have access, I have complete access to the database but no access to the vB php files.

Also, while I have asked this before I'll ask again - is there any way to create a forum "blindly", as in outside the architecture? I looked at the forums table and its incredibly complex and requires some vB-only generated things.
Reply With Quote
  #5  
Old 01-21-2007, 09:33 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do it in MySQL, it is simpler that way (my query should work). Get them to enter their username - not their userid. You can change my select userid to select *
Reply With Quote
  #6  
Old 01-22-2007, 03:07 AM
Sykoi Sykoi is offline
 
Join Date: Dec 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well my problem with entering a user's name is that ... Is, well - easy to screw up... A lot of my forum members have unicode in their name, spaces in their name, etc.... Things that are easy to mess up
Reply With Quote
  #7  
Old 01-22-2007, 03:09 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well how do they sign-on in the first place?

Userid is easy too, simple enough to change that in the above query...
Reply With Quote
  #8  
Old 01-22-2007, 03:12 AM
Sykoi Sykoi is offline
 
Join Date: Dec 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good point... Guess userid is kind of hard for some people to get, although my concern was the people (Like myself) who click "Remember me"... I haven't logged in for almost a year :P

Anyways, on a related note - whats the best way to create a new forum blindly?:
Quote:
Also, while I have asked this before I'll ask again - is there any way to create a forum "blindly", as in outside the architecture? I looked at the forums table and its incredibly complex and requires some vB-only generated things.
Reply With Quote
  #9  
Old 01-22-2007, 03:16 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't have the time to go into much detail, but you could take the array that vBulletin generates and share that with your other site (save as .php file using var_export or serialized array). That would make it easier to process.
Reply With Quote
  #10  
Old 01-22-2007, 03:18 AM
Sykoi Sykoi is offline
 
Join Date: Dec 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So basically get the function in the admin area to generate a new forum, use it to generate a dummy forum with the permissions I need, access the data inside that (Securely with a keycode or something) using readfile or fopen, unserialize the array, and simply replace the variables I need and commit that to the database...?
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 08:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04560 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_php
  • (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