Jump to content

[phpBB]MaNGOS Login Bridge


Guest xeross155

Recommended Posts

phpBB-Registration-Bridge.png

Where do I download the bridge ?

The file can be found here

Okay I've got the file, now what's next ?

* Extract the contents into phpbb_root/includes/auth/

* Edit the line that says

$conn = new mysqli("host", "username", "password", "logondb");

to your own details

* Upload the new file if this was a local folder if not go to step 3

* Go into your admin panel

* Go to General->Client Communication->Authentication

* From the topmost dropdown select Wow

* Click submit

* Go to Permissions->Group Permissions

* Select the registered users group and click submit

* Click on advanced permissions

* Click on the profile tab

* Set "Can change password" and "Can change email address"

* Click apply all permissions

* Login with any account that's in your MaNGOS database and it will be logged in and added to the forums.

Features

  • * Checks for bans
    * Password changes on the wow server work on the forum
    * All phpBB features will work

If you have any questions, remarks or comments, don't hesitate to reply to the thread.

Link to comment
Share on other sites

i think, its unsafe, can be easy to steal account by others

Same question as Diablox, why would you think that, please explain, because if you found an exploit I can fix it.

Could you upload it to another (proper) hoster?

What is wrong with mediafire ?

Link to comment
Share on other sites

Same question as Diablox, why would you think that, please explain, because if you found an exploit I can fix it.

What is wrong with mediafire ?

nevermind,

i created bug, i modificated phpbb3 and deleted some important things near queries.

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

this script is not working for me i use phpBB v3.0.7-pl1 and Mangos Rev: 9967

by the login in the forum comes this error "You have specified an incorrect password. Please check your password and try again"

Username and Password works for the login to the Mangos server

and the settings "$conn = new mysqli("host", "username", "password", "logondb");" for the script are all ok

Please help me this is are very nice script

thanks in advance and Sorry for my BAD English

MfG

Blackbandit

Link to comment
Share on other sites

Hello,

this script is not working for me i use phpBB v3.0.7-pl1 and Mangos Rev: 9967

by the login in the forum comes this error "You have specified an incorrect password. Please check your password and try again"

Username and Password works for the login to the Mangos server

and the settings "$conn = new mysqli("host", "username", "password", "logondb");" for the script are all ok

Please help me this is are very nice script

thanks in advance and Sorry for my BAD English

MfG

Blackbandit

This usually means you entered a wrong password as far as I know, can't imagine the script would cause that.

Link to comment
Share on other sites

Could you upload it to another (proper) hoster?

What is wrong with mediafire ?

I don't know for how long, but the download host is currently unavailable, maybe you could upload it at another host too?

//Edit: Sorry, it's up again :)

Link to comment
Share on other sites

I get this error:

 [02-Jun-2010 08:23:42] [02-Jun-2010 10:08:07] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[02-Jun-2010 10:08:07] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[02-Jun-2010 10:08:07] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[02-Jun-2010 10:08:07] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

What does it means?

And how can i revert because i cant login now :(?

Link to comment
Share on other sites

Although I'm not part of the PHPBB Registration Bridge project, I'll point out that those errors are not caused by PHPBB RB. They are only telling that you are missing php extensions/modules.

If you installed PHP from source make sure to use the --with-sqlite configuration switches, more info available at http://us2.php.net/manual/en/sqlite.installation.php, if you installed from a package system providing by your OS distribution make sure to install the php-sqlite packages as well to resolve this issue.

I do not know if those extensions are required by this project or not, I'm only posting how to resolve your issue

Edit: I just glanced at the source code and its using the mysqli library in php so you would need to make sure to compile with

./configure --with-mysql=/usr/bin/mysql_config --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

as an example, or install the appropriate packages for your OS distro as mentioned above

http://us2.php.net/manual/en/mysqli.installation.php

A note to the author, maybe add in support for selecting mysql or mysqli by the user so they can choose to use what they have installed

Also pdo.so and sqlite.so should be enabled by default, which is odd that you get an error stating they are not there. What version of PHP are you using and have you customized it yourself any?

Link to comment
Share on other sites

Well this is starting to become a bug thread for a non-MaNGOS project, but hopefully nobody minds too much.

I'm not very familiar with PHPBB but I would assume since you cannot login as an admin to change the settings you could theoretically rename the files used for the authentication process, this will require FTP access or some other way to modify files.

1) rename "auth_wow.php" to "auth_wow.php.bak"

2) copy the previous auth file you used (I don't know what the name of this file would be, sorry) and name it "auth_wow.php"

3) login as admin and change your settings back to how they should be (follow steps 4-6 in xeross155's first post, just choose your previous auth instead of WoW)

If this worked you can delete the new "auth_wow.php" and you can delete or rename your old "auth_wow.php.bak" file.

I would suggest waiting for a new patch to resolve your problem or write one your self

Assuming you don't have a more serious error lurking around, this should revert your auth settings.

But like I said I'm not familiar with PHPBB and this is all in theory only

Link to comment
Share on other sites

  • 2 weeks later...
phpBB-Registration-Bridge.png

Where do I download the bridge ?

The file can be found here

Okay I've got the file, now what's next ?

* Extract the contents into phpbb_root/includes/auth/

* Edit the line that says

$conn = new mysqli("host", "username", "password", "logondb");

to your own details

* Upload the new file if this was a local folder if not go to step 3

* Go into your admin panel

* Go to General->Client Communication->Authentication

* From the topmost dropdown select Wow

* Click submit

* Go to Permissions->Group Permissions

* Select the registered users group and click submit

* Click on advanced permissions

* Click on the profile tab

* Set "Can change password" and "Can change email address"

* Click apply all permissions

* Login with any account that's in your MaNGOS database and it will be logged in and added to the forums.

Features

  • * Checks for bans
    * Password changes on the wow server work on the forum
    * All phpBB features will work

If you have any questions, remarks or comments, don't hesitate to reply to the thread.

Verified and working with 3.0.6... I will soon be re-releasing a version of Bruno's Minimanager with integrated phpbb3 and centralized config.. just want to work on making the minimanager skin look more like a CMS first.

Link to comment
Share on other sites

Great work xeross155!

As for me I'm doing a research on how the users are added in phpbb... so when someone registers at the forums he'll automatically get an account on the server. Same for password changes/email changes at the forum. Just need to find those insert/update functions....

P.S.: This worked great on 3.0.6 and 3.0.7 Phpbb btw.

Edit: Atm I've figured out how to add the account into realmd db after registration, but still dunno about password change function...

Edit2: Password and email changes in profile now are also applied into the realmd accounts.

Edit3: If someone forgots his password, the new generated password is also applied to realmd account.

I can post the changes I've made to the phpbb files, the original idea was Frostbyte's.

Link to comment
Share on other sites

Password and email change in the profile

Open includes/ucp/ucp_profile.php

Search for this part:

if (sizeof($sql_ary))
                       {
                           $sql = 'UPDATE ' . USERS_TABLE . '
                               SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
                               WHERE user_id = ' . $user->data['user_id'];
                           $db->sql_query($sql);
                       }

Before the last bracket add this:

                           $con = mysql_connect('host','hostid','hostpass');
                           mysql_select_db('realmdb',$con);

                              $email = $data['email']; 
                              $username = $data['username']; 
                              $password = $data['new_password'];
                              $name = strtoupper($username);
                              $password = strtoupper($password);  
                              $hashed_pw = sha1($name.':'.$password);  
                           mysql_query("UPDATE account set sha_pass_hash='".$hashed_pw."', email='".$email."' where  username='".$username."'");
                           mysql_select_db('forumsdb',$con);

Don't forget to change the database connection info. I know there might be a better way to do this by using phpbb functions, if you can improve it please do and share it.

Link to comment
Share on other sites

take a look at smartymangos svn http://svn2.assembla.com/svn/smartymangos

its an old abandoned project, but has phpbb integrated, with functions u guys are implementing and many more like forum acc syncing with existing game acc and vice versa, etc

its possible that u can find some usefull info

Thanks for the link!

Atm, I've found out that Frostbyte's mod doesn't work well with xeross's bridge...

I'm now looking how the users are registered in phpbb so the realmd account is created too.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use