Ales 2 Share Posted April 24, 2016 Connection to database is successful, i have problem authorize member. IPB uses hashes and salts and is written in php, Rs clients are mostly java and it can be a mess.. How do rs bot clients handle that? Link to comment Share on other sites More sharing options...
Explicit 213 Share Posted April 24, 2016 You write a PHP auth script or connect to the DB directly and verify the hash using their algorithm. I have a PHP script if you need it. Link to comment Share on other sites More sharing options...
Ales 2 Author Share Posted April 24, 2016 You write a PHP auth script or connect to the DB directly and verify the hash using their algorithm. I have a PHP script if you need it. i have no idea how to set that sql statement for their algorithm. you can share php script or help me with sql statement? Link to comment Share on other sites More sharing options...
Explicit 213 Share Posted April 24, 2016 i have no idea how to set that sql statement for their algorithm. you can share php script or help me with sql statement? You don't do it in the SQL. Pull back the data you need to validate the password (hash and salt) or use their PHP API. Link to comment Share on other sites More sharing options...
Ales 2 Author Share Posted April 24, 2016 You don't do it in the SQL. Pull back the data you need to validate the password (hash and salt) or use their PHP API. sorry i have no idea how to do it and there are no guides Link to comment Share on other sites More sharing options...
Explicit 213 Share Posted April 24, 2016 <?php /** * Created by PhpStorm. * User: Anthony * Date: 2/12/15 * Time: 11:06 PM */ /* Make sure we don't get redirected ! */ define('IPS_ENFORCE_ACCESS', TRUE); /* Change directories so that proper directory is picked up */ chdir('/var/www/html/forums'); /* Define us as public */ define('IPB_THIS_SCRIPT', 'public'); require_once('/var/www/html/forums' . '/initdata.php'); /* If login, set the IPS variables */ if(isset($_GET['u']) && isset($_GET['p'])) { $_POST['ips_username'] = $_GET['u']; $_POST['ips_password'] = $_GET['p']; } /* IPS Registry */ require_once(IPS_ROOT_PATH . 'sources/base/ipsRegistry.php'); require_once(IPS_ROOT_PATH . 'sources/base/ipsController.php'); $ipsRegistry = ipsRegistry::instance(); $ipsRegistry->init(); $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login'); $login = new $classToLoad($ipsRegistry); $login->init(); /* Verify login details with IP.Board */ $login->verifyLogin(); if ($login->return_code == 'SUCCESS') { // success } else { // failed } Link to comment Share on other sites More sharing options...
Ales 2 Author Share Posted April 25, 2016 <?php /** * Created by PhpStorm. * User: Anthony * Date: 2/12/15 * Time: 11:06 PM */ /* Make sure we don't get redirected ! */ define('IPS_ENFORCE_ACCESS', TRUE); /* Change directories so that proper directory is picked up */ chdir('/var/www/html/forums'); /* Define us as public */ define('IPB_THIS_SCRIPT', 'public'); require_once('/var/www/html/forums' . '/initdata.php'); /* If login, set the IPS variables */ if(isset($_GET['u']) && isset($_GET['p'])) { $_POST['ips_username'] = $_GET['u']; $_POST['ips_password'] = $_GET['p']; } /* IPS Registry */ require_once(IPS_ROOT_PATH . 'sources/base/ipsRegistry.php'); require_once(IPS_ROOT_PATH . 'sources/base/ipsController.php'); $ipsRegistry = ipsRegistry::instance(); $ipsRegistry->init(); $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login'); $login = new $classToLoad($ipsRegistry); $login->init(); /* Verify login details with IP.Board */ $login->verifyLogin(); if ($login->return_code == 'SUCCESS') { // success } else { // failed } Thank you i will try to figure rest on my own Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.