vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Another One - Different MD5 Hashes.. (https://vborg.vbsupport.ru/showthread.php?t=128237)

speedway 10-04-2006 03:35 AM

Another One - Different MD5 Hashes..
 
Howdy

I have been searching for an answer but nothing comes close to my problem. I am trying to login from another product, vbDrupal to be exact. Folks over there aren't sure what's going on so I thought I would ask on the VB side...

Basically vbDrupal uses the same operation to log into VB. The input from the login box is run through md5hash to produce the 2 required MD5 hashed variables, exactly the same as Vb does it. These values are then passed to the VB function verify_authentication thus:

Code:

    $login_result = verify_authentication($name, $pass, $pass_md5, $pass_md5_utf, $remember, true );
This is all well an good and the vars arrive in the VB function as expected. But the problem is that while processing this section:

Code:

            $vbulletin->userinfo['password'] != iif($password AND !$md5password, md5(md5($password) . $vbulletin->userinfo['salt']), '') AND
            $vbulletin->userinfo['password'] != iif($md5password, md5($md5password . $vbulletin->userinfo['salt']), '') AND
            $vbulletin->userinfo['password'] != iif($md5password_utf, md5($md5password_utf . $vbulletin->userinfo['salt']), '') )

2 different MD5 hashes are produced. When coming from a VB login, everything matches but when coming from a vbDrupal login they don't. In the following is print dumps of the vars in verify_authentication from 1. vbDrupal and 2. VB login script.

Code:

1. In verify_authentication U ********** | P | MD5 6a39c2f21e6aaa086eb504e92036c282 | MDF_UTF 6a39c2f21e6aaa086eb504e92036c282 | PWD w/SALT 0cb3a82320674097a32f49281932f449 | | MD5 w/SALT af15c389037bf36faafc61e5b5ab613f | | VB Password 7ae4ed232a0c3e5ef2181a62d61e47b4 | Passwords Don't Match

2. In verify_authentication U ********** | P | MD5 6a39c2f21e6aaa086eb504e92036c282 | MDF_UTF 6a39c2f21e6aaa086eb504e92036c282 | PWD w/SALT 46e9ff795cafb40480a34c72f10bbd62 | | MD5 w/SALT 7ae4ed232a0c3e5ef2181a62d61e47b4 | | VB Password 7ae4ed232a0c3e5ef2181a62d61e47b4 |

Can anyone suggest a reason that the resulting md5 hash would produce a different result with the exact same starting data? The final MD5 w/SALT values above should equal the VB Password hash, which only one does...

Hoping someone can help..

Cheers
Bruce


All times are GMT. The time now is 01:12 AM.

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.00905 seconds
  • Memory Usage 1,710KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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