Help - Search - Members - Calendar
Full Version: IPB 2.x Integration
Invision Power Services > Community Forums > Community Web Design and Coding
Quadodo
I've integrated IPB 2.x member features with a remote application. The only problem is, if their password contains special characters, the password is deemed invalid. Code:

CODE
$password=$_POST['password'];
$getforuminfo=mysql_query("SELECT * FROM ibf_members WHERE name='$username'",$link) or die(query_error(__LINE__));
$getforuminfo=mysql_fetch_array($getforuminfo);
$converge=mysql_query("SELECT converge_pass_salt,converge_pass_hash FROM ibf_members_converge WHERE converge_id='$getforuminfo[id]'",$link) or die(query_error(__LINE__));
$converge=mysql_fetch_array($converge);
$end_pass=md5(md5($converge['converge_pass_salt']).md5($password));
if ($end_pass == $converge['converge_pass_hash']) {
// password is right
}
else {
// password is wrong
}
Bulk
I'm sorry whats the question?
Grant
Im guessing he wants to know how to fix the special characters issue.

What characters are throwing the error?
Quadodo
I haven't found out which ones exactly, but probably all of these:
!@#$%^&*

And maybe more.
IAIHMB
Escape before save and compare?
Quadodo
It still failed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.