Bug #72638 [NEW]: client fails to set "CLIENT_CONNECT_ATTRS" in capability flag
From: littlewintergrass at gmail dot com Date: Thu, 21 Jul 2016 02:43:51 +0000 Subject: Bug #72638 [NEW]: client fails to set "CLIENT_CONNECT_ATTRS" in capability flag Groups: php.bugs Request: Send a blank email to php-bugs+get-202463@lists.php.net to get a copy of this message
From: littlewintergrass at gmail dot com Operating system: any PHP version: Irrelevant Package: MySQL related Bug Type: Bug Bug description:client fails to set "CLIENT_CONNECT_ATTRS" in capability flag Description: ------------ Client will send handshake response to MySQL server after receiving server greeting packet. mysqlnd extension adds client attribute "_client_name" as "mysqlnd" in the handshake response packet: https://github.com/php/php-src/blob/master/ext/mysqlnd/mysqlnd_connection.c#L834 According to MySQL protocol, client should set "CLIENT_CONNECT_ATTRS" bit in its capability flag if any client attribute is added: http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse41 http://dev.mysql.com/doc/internals/en/capability-flags.html#flag-CLIENT_CONNECT_ATTRS However it is never set in handshake response. The macro is defined here: https://github.com/php/php-src/blob/master/ext/mysqlnd/mysqlnd_enum_n_def.h#L102 For those MySQL servers that strictly follow the protocol, this will cause packet parsing failure. -- Edit bug report at https://bugs.php.net/bug.php?id=72638&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72638&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72638&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72638&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72638&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72638&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72638&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72638&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72638&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72638&r=support Expected behavior: https://bugs.php.net/fix.php?id=72638&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72638&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72638&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72638&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72638&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72638&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72638&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72638&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72638&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72638&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72638&r=mysqlcfg
Thread (1 message)
| « previous | php.bugs (#202463) | next » |
|---|