You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christophe JAILLET <ch...@wanadoo.fr> on 2018/08/20 19:14:21 UTC

[users@httpd] Re: Special characters in password for mod_dbd

Hi,

This seems to be mysql APR driver specific.

For some reasons, in APR, in function dbd_mysql_open(), fields are split 
according to delimiters in:
     static const char *const delims = " \r\n\t;|,";

See Remarks about MySQL at:
http://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html#gabddb1fdcb2f8a5f5b83127485c78e8ae


According to the code, there is no way to avoid the "incorrect" split of 
the DBDParams parameter.
I guess that your best option is to modify the password.

CJ


Le 19/08/2018 à 19:29, Mimiko a écrit :
> Hello.
>
> I have special characters in the password to connect to database from 
> httpd basic authentication using mod_dbd in version 2.4.
>
> I use:
> DBDriver mysql
> DBDParams 
> host=some_ip,dbname=schema,user=user_name,pass=password_with_special_chars.:)]|&; 
>
>
> But httpd does not read it correctly so could not authenticate to 
> mysql. The user and password is correct.
>
> How to escape special characters for the password?
>
> On httpd 2.2 using DBDriver odbc the same password is interpreted 
> correctly.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Special characters in password for mod_dbd

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Hi,

I have no idea why so many separators have been allowed.
I googled a bit yesterday, and didn't find anything useful. Most other 
mysql connectors I've found only use ';'.

But it is documented this way since a long time in APR.

Removing some separators could break some existing configuration. So, 
IMHO, it is unlikely to be accepted.
We maybe should have some way to escape some characters to be allowed 
these delimiters to be used as "normal" characters.

I cross-post to APR dev@ mailing list to have others feed-back on it.

CJ

Le 21/08/2018 à 09:17, Mimiko a écrit :
> Thank you
>
> I was looking for such info and didn't found.
>
> Why so much chars left for params split? Should I fire a request or 
> this will not be changed in future by concept?
>
>
> On 20.08.2018 22:14, Christophe JAILLET wrote:
>> This seems to be mysql APR driver specific.
>>
>> For some reasons, in APR, in function dbd_mysql_open(), fields are 
>> split according to delimiters in:
>>      static const char *const delims = " \r\n\t;|,";
>>
>> See Remarks about MySQL at:
>> http://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html#gabddb1fdcb2f8a5f5b83127485c78e8ae 
>>
>>
>>
>> According to the code, there is no way to avoid the "incorrect" split 
>> of the DBDParams parameter.
>> I guess that your best option is to modify the password.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Special characters in password for mod_dbd

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Hi,

I have no idea why so many separators have been allowed.
I googled a bit yesterday, and didn't find anything useful. Most other 
mysql connectors I've found only use ';'.

But it is documented this way since a long time in APR.

Removing some separators could break some existing configuration. So, 
IMHO, it is unlikely to be accepted.
We maybe should have some way to escape some characters to be allowed 
these delimiters to be used as "normal" characters.

I cross-post to APR dev@ mailing list to have others feed-back on it.

CJ

Le 21/08/2018 à 09:17, Mimiko a écrit :
> Thank you
>
> I was looking for such info and didn't found.
>
> Why so much chars left for params split? Should I fire a request or 
> this will not be changed in future by concept?
>
>
> On 20.08.2018 22:14, Christophe JAILLET wrote:
>> This seems to be mysql APR driver specific.
>>
>> For some reasons, in APR, in function dbd_mysql_open(), fields are 
>> split according to delimiters in:
>>      static const char *const delims = " \r\n\t;|,";
>>
>> See Remarks about MySQL at:
>> http://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html#gabddb1fdcb2f8a5f5b83127485c78e8ae 
>>
>>
>>
>> According to the code, there is no way to avoid the "incorrect" split 
>> of the DBDParams parameter.
>> I guess that your best option is to modify the password.



Re: [users@httpd] Re: Special characters in password for mod_dbd

Posted by Mimiko <vb...@gmail.com>.
Thank you

I was looking for such info and didn't found.

Why so much chars left for params split? Should I fire a request or this will not be changed in future by concept?


On 20.08.2018 22:14, Christophe JAILLET wrote:
> This seems to be mysql APR driver specific.
> 
> For some reasons, in APR, in function dbd_mysql_open(), fields are split according to delimiters in:
>      static const char *const delims = " \r\n\t;|,";
> 
> See Remarks about MySQL at:
> http://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html#gabddb1fdcb2f8a5f5b83127485c78e8ae
> 
> 
> According to the code, there is no way to avoid the "incorrect" split of the DBDParams parameter.
> I guess that your best option is to modify the password.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org