Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 04-08-2008, 04:42 PM
Arrangements's Avatar
Arrangements Arrangements is offline
 
Join Date: Jul 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User System on Main Site

I've made the hard choice to have my site's user system synchronize with my vb forum users.

I'm creating the registration page right now on my main site; and I've hit a dead end.

I came to this:
PHP Code:
$encpass sha1SALT $password ); 
I'v defined it:
PHP Code:
define('SALT''something'); 
So my question of problem is, wouldn't the password be encrypted differently on vb then on my mainsite? How does vb encrypt their passwords?


Edit: Okay after doing some searching, I found this
PHP Code:
md5(md5($password) . $salt); 
to be the way vb hash's up the password. Right? Correct me if I'm wrong.

And then $salt needs needs to pulled from vb's database to check the password on my mainsite.

Now here comes the 2nd part Cookies?

Quote:
Originally Posted by https://vborg.vbsupport.ru/showthread.php?t=98047
$_COOKIE:
{cookiepfx}userid - plain(userid)
{cookiepfx}password - md5(md5(md5('PlaintextPassword') . salt) . 'LicenseNo').
Why is it does it use md5() 3 times?

Does that mean when I authenticate their cookie information I need to say.. 'reverse the md5()' once and then I can SELECT?
Reply With Quote
  #2  
Old 04-08-2008, 07:25 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To encrypt the License number so it isn't as easy to get. Also to change the password from what is stored in the database.
Reply With Quote
  #3  
Old 04-09-2008, 05:35 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Arrangements View Post
Why is it does it use md5() 3 times?
So it is more secure.
Quote:
Originally Posted by Arrangements View Post
Does that mean when I authenticate their cookie information I need to say.. 'reverse the md5()' once and then I can SELECT?
You can't reverse MD5. MD5 is a one-way hash. To authenticate the cookie, you will need to encrypt the password from the database to the same algorithm.
Reply With Quote
  #4  
Old 04-12-2008, 05:12 AM
Arrangements's Avatar
Arrangements Arrangements is offline
 
Join Date: Jul 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
So it is more secure.

You can't reverse MD5. MD5 is a one-way hash. To authenticate the cookie, you will need to encrypt the password from the database to the same algorithm.
Oh, why didn't I think of that! Thanks, I hear what you are saying.

NOW, this is what has baffled me!

How do I start? <- simple? No?

- How do make a copy of all of the users on the forum onto my main database, while development, when new users have to be created on the forum? Do disable registration while development?
Edit: [Removed because going off topic of the real question]
Reply With Quote
  #5  
Old 04-14-2008, 06:18 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Arrangements View Post
How do make a copy of all of the users on the forum onto my main database, while development, when new users have to be created on the forum? Do disable registration while development?
I'm a bit confused at what you want to do. What you want to do is to convert users, correct? If so, your best option would be to copy some of the users into a test database, then create your conversion script. Test your script on the test database to see if it works correctly, if it does, backup your main database and run your script.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:59 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.04095 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete