Bug #43104 ndb_mgmd - error message with newline(s) breaks mgmapi protocol
Submitted: 23 Feb 2009 10:41 Modified: 2 Apr 2009 8:40
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:6.2.17 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[23 Feb 2009 10:41] Magnus Blåudd
Description:
Error messages in ndb_mgmd that are supposed to be returned to mgmapi should not contain newline(\n) since that will break the mgapi protcol that uses newline as line separator.

How to repeat:
.

Suggested fix:
Remove the newlines in error messages that will be transfered over the wire to mgmapi. It would also be possible to base64 encode the errormessage, but that would break backward compatibility.
[23 Feb 2009 10:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/67154

2853 Magnus Svensson	2009-02-23
      Bug#43104 ndb_mgmd - error message with newline(s) breaks mgmapi protocol
       - Remove the two new lines used in error messages
      modified:
        storage/ndb/src/mgmsrv/MgmtSrvr.cpp
[23 Feb 2009 13:13] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:msvensson@mysql.com-20090223120719-zvoo2whxvvglj6d9) (version source revid:msvensson@mysql.com-20090223120719-zvoo2whxvvglj6d9) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)
[23 Feb 2009 13:14] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:msvensson@mysql.com-20090223120719-ctsa206vnv7nu1f8) (version source revid:msvensson@mysql.com-20090223120719-ctsa206vnv7nu1f8) (merge vers: 5.1.32-ndb-6.3.23) (pib:6)
[23 Feb 2009 13:16] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:msvensson@mysql.com-20090223120724-6jb5hzpz29bp0ru2) (version source revid:msvensson@mysql.com-20090223120724-6jb5hzpz29bp0ru2) (merge vers: 5.1.32-ndb-6.4.3) (pib:6)
[2 Apr 2009 8:40] Jon Stephens
Documented bugfix in the NDB-6.2.17, 6.3.23, and 6.4.3 changelogs as follows:

        Some error messages from ndb_mgmd that contained newline (\n)
        characters. This could break the MGM API protocol, which uses
        the newline as a line separator.