Due a bug in few MySQL versions and due too many possible combination of database connection charset and database/table collation, upgrades from MySQL4.x to >= 4.1, upgrades to latest DragonflyCMS ... and many more, I felt forced to hold a new release to fix all those issues in once.
DJ found the solution and its in cvs already.
More infos for developers:
as you already know $userinfo['user_ip'] holds a packed version in binary format of the visitor ip. We used to apply a right padding '/' to avoid MySQL bugs but for today standards this wasn't the proper fix.
Few of us noticed this bug a while ago when, for example, poster ip was different then what apache logged.
Solution was to send the ip in HEX format, every RDBMS using any kind of connection, collation.... will properly convert the hexadecimal ip into binary format. $userinfo['user_ip'] does hold the hexadecimal ip (not binary ip anymore) without the trailing '/'.
So far so good.
1) use $db->binary_safe instead of $db->escape_binary
2) remove single quotes from within the queries
$ip = $db->escape_binary(Security::get_ip()).'/';
$db->sql_query("INSERT INTO table ip='$ip'");
$ip = $db->binary_safe(Security::get_ip());
$db->sql_query("INSERT INTO table ip=$ip");
$db->sql_query("INSERT INTO table ip='".$userinfo['user_ip']."'");
$db->sql_query("INSERT INTO table ip=".$userinfo['user_ip']);
.:: I met php the 03 December 2003 :: Unforgettable day! ::.
Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS