cvs: php4 /pear DB.php
| From: | Jon Parise | Date: | Thu, 04 Oct 2001 00:29:37 +0000 |
| Subject: | cvs: php4 /pear DB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-923@lists.php.net to get a copy of this message | ||
jon Wed Oct 3 20:29:37 2001 EDT
Modified files:
/php4/pear DB.php
Log:
Search for the '@' symbol in the DSN from the right instead of the left.
That will allow the password element to include a '@' symbol without
confusing the DSN parser.
Submitted by: Alex L <admin@networkessence.net>
Index: php4/pear/DB.php
diff -u php4/pear/DB.php:1.73 php4/pear/DB.php:1.74
--- php4/pear/DB.php:1.73 Fri Aug 3 10:13:52 2001
+++ php4/pear/DB.php Wed Oct 3 20:29:37 2001
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: DB.php,v 1.73 2001/08/03 14:13:52 cox Exp $
+// $Id: DB.php,v 1.74 2001/10/04 00:29:37 jon Exp $
//
// Database independent query interface.
//
@@ -459,7 +459,7 @@
// Get (if found): username and password
// $dsn => username:password@protocol+hostspec/database
- if (($at = strpos($dsn,'@')) !== false) {
+ if (($at = strrpos($dsn,'@')) !== false) {
$str = substr($dsn, 0, $at);
$dsn = substr($dsn, $at + 1);
if (($pos = strpos($str, ':')) !== false) {
@@ -722,4 +722,4 @@
}
}
-?>
\ No newline at end of file
+?>