IPB - Special Characters Problem

GrizzlyA

Neophyte
Joined
Jan 31, 2016
Messages
3
So for some reason passwords with special characters (!, @, $, etc) do not work.
Any idea why IP.Board is doing this? (I also tried mysql & mysqli)

This is the script I wrote:
Code:
<?php
// Script Details
define( 'IPB_THIS_SCRIPT', 'public' );

// Include Headers
require_once( './initdata.php' );
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );

// Initialize Registry
IPSRegistry::init();

// Include Headers (After Registry)
require_once( IPS_ROOT_PATH . 'sources/base/ipsMember.php' );

// Check Parameters
if (!isset($_GET['id']) || !isset($_GET['pw']))
{
// Display Error
echo "MISSING_PARAMETERS";

// Stop Execution
exit;
}

// Setup Parameters
$Parameter['UserID'] = $_GET['id'];
$Parameter['Password'] = md5($_GET['pw']);

// Authenticate User
if ( ipsMember::authenticateMember( $Parameter['UserID'], $Parameter['Password'] ) == true )
echo "SUCCESS_LOGIN";
else
echo "FAIL_LOGIN";

// Stop Execution
exit();
?>
 

dtdesign

Developer
Joined
Nov 13, 2012
Messages
570
My guess is that your input data doesn't match the encoding used by IP.B. For instance, content encoded with ISO-8859-1 and UTF-8 has a different binary representation and algorithms such as md5() work with the binary data directly, as a result the hash will differ even though the content itself is identical.
 

GrizzlyA

Neophyte
Joined
Jan 31, 2016
Messages
3
My guess is that your input data doesn't match the encoding used by IP.B. For instance, content encoded with ISO-8859-1 and UTF-8 has a different binary representation and algorithms such as md5() work with the binary data directly, as a result the hash will differ even though the content itself is identical.
I found the fix, for some reason IPB saves special chars in their HTML form (thus "!" becomes "&#0033;")
It's really stupid and I coded a function that replaces input data with their HTML form, isn't there a way in IPB to do this?

Thanks!
 

dtdesign

Developer
Joined
Nov 13, 2012
Messages
570
It's really stupid and I coded a function that replaces input data with their HTML form, isn't there a way in IPB to do this?
I'm sorry, but I have never really worked with IP.B and I was just making an educated guess :D
 

Tracy Perry

Opinionated asshat
Joined
May 25, 2013
Messages
4,991
I found the fix, for some reason IPB saves special chars in their HTML form (thus "!" becomes "&#0033;")
It's really stupid and I coded a function that replaces input data with their HTML form, isn't there a way in IPB to do this?
I imagine it's their push to be "pure html"... and it steps in at some unexpected places.
 
Top