Commit graph

208 commits

Author SHA1 Message Date
Stanislav Malyshev
fbb6a27212 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:00 -07:00
Stanislav Malyshev
c34895e837 Fix bug #77967 - Bypassing open_basedir restrictions via file uris 2019-05-27 18:48:48 -07:00
bohwaz
58c25bf679
SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws 2019-03-11 18:02:03 +01:00
bohwaz
e93259bb23 SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws 2019-03-11 16:26:15 +01:00
BohwaZ
94ec262fca Fix #77051: Issue with re-binding on SQLite3
We have to call `sqlite3_reset()` before re-binding the parameters.
2018-11-29 02:16:57 +01:00
Christoph M. Becker
ce66492a13 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
2018-07-26 13:26:58 +02:00
Christoph M. Becker
ed7e3bc70a Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
We need to ensure that a zval IS_DOUBLE before we access it as such.
In this case we apply common type juggling to do so.
2018-07-26 13:15:19 +02:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Remi Collet
5e5895a464 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:23 +02:00
Remi Collet
5f030924c1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:02 +02:00
Remi Collet
666cb6c802 fix build with old system libsqlite (sqlite3_errstr may be missing) 2017-08-02 14:01:56 +02:00
Anatol Belski
176b45fa3a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags
2017-07-09 01:32:07 +02:00
Anatol Belski
02cc492015 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags
2017-07-09 01:31:25 +02:00
Anatol Belski
b5338c0b7d Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags 2017-07-08 23:52:22 +02:00
Nikita Popov
035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
BohwaZ
626ee74ee8 Change flags to use SQLITE3_OPEN_READ* constants instead of a fake-boolean, add tests on errors 2017-06-08 11:25:00 +12:00
BohwaZ
208aea1e85 Implement writing to BLOBs in SQLite3 2017-05-18 11:54:55 +12:00
Anatol Belski
e282c403c5 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix misleading typo in identifiers
2017-04-11 13:50:56 +02:00
Anatol Belski
a334da8b17 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix misleading typo in identifiers
2017-04-11 13:49:19 +02:00
Anatol Belski
8bba2df2eb Fix misleading typo in identifiers 2017-04-11 13:48:04 +02:00
Joe Watkins
f0f8c9cf0a
Merge branch 'PHP-7.1'
* PHP-7.1:
  fixed bug #74413 wrong reflection on SQLite3::enableExceptions
2017-04-11 12:17:00 +01:00
Joe Watkins
8bbdbd063e
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed bug #74413 wrong reflection on SQLite3::enableExceptions
2017-04-11 12:15:24 +01:00
Joe Watkins
b74b325aea
fixed bug #74413 wrong reflection on SQLite3::enableExceptions 2017-04-11 12:14:25 +01:00
Remi Collet
83b0708878 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix buid with system libsqlite, see bug #74217
2017-03-29 07:28:26 +02:00
Remi Collet
012dc336a6 Fix buid with system libsqlite, see bug #74217
SQLITE_DETERMINISTIC only exists in recent version
e.g. missing on 3.7 which is the default on RHEL/CentOS-7
and probably others (wheezy have 3.7, jessie 3.8...)
2017-03-29 07:25:01 +02:00
Nikita Popov
e31342ef84 Merge branch 'PHP-7.1' 2017-03-12 17:04:02 +01:00
andrewnester
fbf0e0587f Implement FR #74217: deterministic sqlite functions 2017-03-12 17:03:00 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Christoph M. Becker
60b4e312ae Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Fix #73530: Unsetting result set may reset other result set"
2016-12-29 13:58:14 +01:00
Christoph M. Becker
f4d884dc6e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Fix #73530: Unsetting result set may reset other result set"
2016-12-29 13:54:11 +01:00
Christoph M. Becker
88d1a2c5aa Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Revert "Fix #73530: Unsetting result set may reset other result set"

# Conflicts:
#	ext/sqlite3/sqlite3.c
2016-12-29 13:47:28 +01:00
Christoph M. Becker
2ba3b27594 Revert "Fix #73530: Unsetting result set may reset other result set"
This reverts commit eb570294a2.

That commit caused a regression, so it's probably best to revert it, and
to tackle the issue for the next minor release.
2016-12-29 12:59:04 +01:00
Christoph M. Becker
07ed7b5198 Merge branch 'PHP-7.1' 2016-11-16 12:08:16 +01:00
Christoph M. Becker
c5abb87322 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-16 12:02:29 +01:00
Christoph M. Becker
936cafe33e Merge branch 'PHP-5.6' into PHP-7.0 2016-11-16 12:00:39 +01:00
Christoph M. Becker
eb570294a2 Fix #73530: Unsetting result set may reset other result set
Calling sqlite3_reset() when a result set object is freed can cause
undesired and maybe even hard to track interference with other result
sets. Furthermore, there is no need to call sqlite3_reset(), because
that is implicitly called on SQLite3Stmt::execute(), and users are
encouraged to explicitly call either SQLite3Result::finalize() or
SQLite3Stmt::reset() anyway.
2016-11-16 11:49:04 +01:00
Kalle Sommer Nielsen
f38834a180 Fix compiler warnings, always cast to zend_long from sqlite3_int64 when converting to a zval 2016-10-20 10:57:38 +02:00
Kalle Sommer Nielsen
6ca38e8cf8 Ignore the return value of sqlite3->busyTimeout() if their "API Armor" is not enabled.
The sqlite3_busy_timeout() function can only ever return SQLITE_OK if the armor is not compiled in, which means we can skip this error check
2016-10-20 10:56:08 +02:00
Christoph M. Becker
e147eeb4bc Merge branch 'PHP-7.1' 2016-10-18 00:02:18 +02:00
Christoph M. Becker
32123167d1 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-18 00:01:32 +02:00
Christoph M. Becker
0b596f81b8 Merge branch 'PHP-5.6' into PHP-7.0
We also use ZEND_LONG_(MAX|MIN) now instead of LONG_(MAX|MIN).
2016-10-17 23:38:28 +02:00
Christoph M. Becker
86e603a664 Fix #73333: 2147483647 is fetched as string
We return all integers that can be represented as such by PHP as
integers, and only those that exceed the possible range as strings.
On builds which represent integers with 64 bits, the range check is
unnecessary and might cause code checkers to complain, so we skip this
special casing via the preprocessor according to
<http://git.php.net/?p=php-src.git;a=commit;h=99d087e5>.
2016-10-17 23:34:41 +02:00
Christoph M. Becker
67153d644d Fix typo 2016-09-02 17:34:11 +02:00
Christoph M. Becker
be11563fa2 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-27 16:54:27 +02:00
Christoph M. Becker
23c359c276 Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/sqlite3/sqlite3.c
2016-07-27 16:48:29 +02:00
Christoph M. Becker
cc125f277b Implement #72653: SQLite should allow opening with empty filename
From the [sqlite3_open](https://www.sqlite.org/c3ref/open.html) docs:

| If the filename is an empty string, then a private, temporary on-disk
| database will be created. This private database will be automatically
| deleted as soon as the database connection is closed.

We make that facility available to userland.

While we're at it, we also do some minor optimizations, remove the
unnecessary check for NUL characters in filename, which is already catered
to by ZPP(p), and add a missing `return` in case db_obj isn't initialized.
2016-07-27 16:41:03 +02:00
Christoph M. Becker
ac0bbea3a8 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-25 17:15:10 +02:00