MyBB Community Forums

Full Version: Using MyBB user/pass/salt for Apache Basic Auth
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently running a MyBB test site. One of the last things I need to do to go production is having Apache use the credentials from mybbql_users.

I have a custom apache mod_auth_mysql. This also has a quota system and extra security bit that checks for password sharing. This is currently working with VBulletin 4.25 as you can see from the config below. What I need to know is how is the MyBB password auth setup?

<Location /members/>
AuthName "Members"
AuthType Basic
AuthBasicProvider mysql
AuthMySQLHost localhost
AuthMySQLUser db_user
AuthMySQLPassword db_pass
AuthMySQLDB db_name
AuthMySQLUserTable user
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLSaltField salt
AuthMySQLPwEncryption vb
#AuthMySQLGroupField membergroupids
AuthMySQLGroupField usergroupid
AuthMySQLEnable On
#require valid-user
#require group 55
require group 6 7 47 49 50
</Location>
# The default limit and State DB config is PER vhost
Quota_DefaultLimit 8g per 20 hours
Quota_LimitDatabase db:/etc/apache2/db/dm_members.db
<Location /members/>
# This is per folder
Quota_Enabled On
</Location>
A MyBB-specific function for AuthMySQLPwEncryption would be needed in the source file (similar to the apparently custom vb one). MyBB passwords are created in the md5(md5($salt).md5($password)) format.
(2020-01-14, 04:03 PM)Devilshakerz Wrote: [ -> ]A MyBB-specific function for AuthMySQLPwEncryption would be needed in the source file (similar to the apparently custom vb one). MyBB passwords are created in the md5(md5($salt).md5($password)) format.
Thanks. I can get my mod updated.

Cheers