Bug #58336 Two following commas in authentication_string lead to rejected login.
Submitted: 19 Nov 2010 20:01 Modified: 14 Dec 2010 23:31
Reporter: Horst Hunger Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.5-wl5366 OS:Any
Assigned to: Georgi Kodinov CPU Architecture:Any

[19 Nov 2010 20:01] Horst Hunger
Description:
The following sql-statement containing " , , " do not deliver an error, but leads
to failing logins of mysql:

create user ''@'' identified with 'authentication_pam' as 'mysql,"test-plugins-02"="sql_test_02",test-plugins-01="sql_test_01" ,   test-plugins-03=sql_test_03,, "test-plugins-04"   =     sql_test_04,test-plugins-05=sql_test_05,test-plugins-06=sql_test_06      ,  test-plugins-07=sql_test_07 ,test-plugins-08=sql_test_08';

E.g

../client/mysql -S var/tmp/mysqld.1.sock --plugin-dir=/home/horst/bzr/mysql-5.5-wl5366/plugin/authentication_pam -h localhost -P 13000 -u test-plug-41 --password=test-plug-pw test

with "test-plug-41" as member of the group "test-plugins-04".

How to repeat:
As root in Linux:
groupadd test-plugins-04;
useradd  -m -p "\$2a\$05\$7fPQ5mcCTCeFF3XvZ0TMdu0cNm2/HrqzUYr4I7xkeVobl8lxZZo9S" -G test-plugins-04,shadow test-plug-41;

In Mysql:
create user ''@'' identified with 'authentication_pam' as 'mysql,"test-plugins-02"="sql_test_02",test-plugins-01="sql_test_01" ,   test-plugins-03=sql_test_03,, "test-plugins-04"   =     sql_test_04,test-plugins-05=sql_test_05,test-plugins-06=sql_test_06      ,  test-plugins-07=sql_test_07 ,test-plugins-08=sql_test_08';

grant all privileges on test.* to sql_test_04;

grant proxy on sql_test_04 to ''@'';

Suggested fix:
skip the comma or deliver an error.
[25 Nov 2010 15:43] Rafal Somla
Good to push.
[28 Nov 2010 23:15] Paul DuBois
Is this specific to the PAM plugin (in which case it needs no changelog entry) or is it a general plugin auth bug? If the latter, I'm not sure how to describe it for the changelog.
[14 Dec 2010 23:31] Paul DuBois
Bug does not appear in any released version. No changelog entry needed.