Closed (won't fix)
Project:
Drupal core
Version:
4.3.2
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
5 Jan 2004 at 15:55 UTC
Updated:
16 Jan 2004 at 19:37 UTC
Comments
Comment #1
gábor hojtsyIt is not that # is 'begin comment', but that # is 'begin fragment identifier', since this stuff is an URI actually. %23 is the correct escaping of # in a URI, but then Drupal will not understand your %23 as #, since parse_url() used by the MySQL database code does not translate that... So either urldecode() should be applied on the parts resulting from parse_url(), or Drupal will not support / and # and other special chars in DB passwords.
BTW the PEAR DB layer decodes URL special chars when parsing the DSN (the database connection URI), so it might be an example for correcting Drupal. See http://cvs.php.net/co.php/pear/DB/DB.php (the parseDSN method).
Comment #2
(not verified) commentedI can live with # not being supported, but a comment in the conf.php
file would be nice. I can imagine other people being bitten by this one.
Maybe parse_url should be named parse_simplified_url :-)
Or create parse_uri with correctly parses uri's.
This also smells like a potential security problem.
Comment #3
Kjartan commentedWhich PHP version are you using?
Seems to parse just fine. Drupal simply passes the 'pass' var to mysql_connect() so then it would have to be a bug in PHP somehow.
Comment #4
(not verified) commentedphp4 -v
4.1.2
So a php version specific related bug then.
Comment #5
moshe weitzman commented