mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix handling of single-key connection strings
This commit is contained in:
commit
4b8bbfb6db
3 changed files with 10 additions and 2 deletions
6
NEWS
6
NEWS
|
@ -24,6 +24,9 @@ PHP NEWS
|
|||
. Backwards-compatible mappings for 0x5C/0x7E in Shift-JIS are restored,
|
||||
after they had been changed in 8.1.0. (Alex Dowad)
|
||||
|
||||
- ODBC:
|
||||
. Fixed handling of single-key connection strings. (Calvin Buckley)
|
||||
|
||||
- OPcache:
|
||||
. Fixed bug GH-8591 (tracing JIT crash after private instance method change).
|
||||
(Arnaud, Dmitry, Oleg Stepanischev)
|
||||
|
@ -34,6 +37,9 @@ PHP NEWS
|
|||
. Fixed bug #81713 (NULL byte injection in several OpenSSL functions working
|
||||
with certificates). (Jakub Zelenka)
|
||||
|
||||
- PDO_ODBC:
|
||||
. Fixed handling of single-key connection strings. (Calvin Buckley)
|
||||
|
||||
09 Jun 2022, PHP 8.1.7
|
||||
|
||||
- CLI:
|
||||
|
|
|
@ -2167,7 +2167,8 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
|
|||
char *ldb = 0;
|
||||
int ldb_len = 0;
|
||||
|
||||
if (strstr((char*)db, ";")) {
|
||||
/* a connection string may have = but not ; - i.e. "DSN=PHP" */
|
||||
if (strstr((char*)db, "=")) {
|
||||
direct = 1;
|
||||
if (uid && !strstr ((char*)db, "uid") && !strstr((char*)db, "UID")) {
|
||||
spprintf(&ldb, 0, "%s;UID=%s;PWD=%s", db, uid, pwd);
|
||||
|
|
|
@ -478,7 +478,8 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (strchr(dbh->data_source, ';')) {
|
||||
/* a connection string may have = but not ; - i.e. "DSN=PHP" */
|
||||
if (strchr(dbh->data_source, '=')) {
|
||||
SQLCHAR dsnbuf[1024];
|
||||
SQLSMALLINT dsnbuflen;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue