Commit Graph

494 Commits

Author SHA1 Message Date
Tim Düsterhus
ac6dbbd183 Mark parameter in ext/oci8 as sensitive 2022-06-13 11:09:12 +02:00
Max Kellermann
b9e895bca0
Replace memcmp() with zend_string functions (#8216)
* ext/oci8: use zend_string_equals()

Eliminate duplicate code.

* main/php_variables: use zend_string_equals_literal()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_equals_cstr()

Allows eliminating duplicate code.

* Zend, ext/{opcache,standard}, main/output: use zend_string_equals_cstr()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_starts_with()

* ext/{opcache,phar,spl,standard}: use zend_string_starts_with()

This adds missing length checks to several callers, e.g. in
cache_script_in_shared_memory().  This is important when the
zend_string is shorter than the string parameter, when memcmp()
happens to check backwards; this can result in an out-of-bounds memory
access.
2022-03-31 16:27:58 +02:00
Christoph M. Becker
900c94fc7c
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
2021-12-12 22:39:08 +01:00
Christoph M. Becker
c35be03628
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
2021-12-12 22:38:55 +01:00
Christoph M. Becker
c435e67746
Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
We must not use the TSRM accessor macros in GINIT and GSHUTDOWN, but
rather use the passed pointers directly.  For simplicity, we inline
`php_oci_cleanup_global_handles()`, and also the `PHP_OCI_CALL()`
macros; the latter are unlikely to be needed here, but don't hurt.

Closes GH-7766.
2021-12-12 22:38:00 +01:00
Christopher Jones
93f6af6913
It's past time to drop linking support for Oracle Client 10g 2021-12-12 13:58:04 +11:00
Christopher Jones
ac91b83ceb
Add oci_set_prefetch_lob() 2021-12-11 21:38:08 +11:00
Christopher Jones
9cd7f41fac
Add oci8.prefetch_lob_size 2021-11-12 17:59:22 +11:00
Tim Starling
c96be7b8f2 Use ASCII lower case for misc case folding
Use ASCII case conversion instead of locale-dependent case conversion in
the following places:

* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
  into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names

Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).

Closes GH-7511.
2021-09-24 09:20:08 +02:00
Nikita Popov
14f599ea7d Use zend_long for resource ID
Currently, resource IDs are limited to 32-bits. As resource IDs
are not reused, this means that resource ID overflow for
long-running processes is very possible.

This patch switches resource IDs to use zend_long instead, which
means that on 64-bit systems, 64-bit resource IDs will be used.
This makes resource ID overflow practically impossible.

The tradeoff is an 8 byte increase in zend_resource size.

Closes GH-7436.
2021-08-31 14:58:59 +02:00
Máté Kocsis
87c181a0b0
Fix oci8.old_oci_close_semantics deprecation is always displayed 2021-07-22 16:21:46 +02:00
Máté Kocsis
e120d5269a
Deprecate oci8.old_oci_close_semantics (#7258) 2021-07-19 11:56:46 +02:00
Patrick Allaert
aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Máté Kocsis
af56982a5e
Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsql
Closes GH-6691
2021-02-14 23:19:21 +01:00
Nikita Popov
3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Christoph M. Becker
2e974c8c81 Add Windows support for OCI 19
As requested by Christopher Jones.
2020-12-14 23:11:04 +01:00
Máté Kocsis
3b0fecd508
Fix UNKNOWN default values in ext/oci8
Closes GH-6089
2020-09-08 15:38:23 +02:00
Christopher Jones
47c787ff5b Squash a Linux compile warning 2020-08-22 11:37:23 +10:00
Christopher Jones
ff66e4945e OCI8 classes were already renamed in 8; this now follows the new-new standard 2020-08-21 17:46:16 +10:00
George Peter Banyard
0d146cb3eb Some cleanup in OCI8 extension for PHP 8 2020-07-22 17:29:30 +10:00
Christopher Jones
74ca2a39a7 Rename OCI8 classes to use standard names so arg stub parsing works 2020-07-20 18:06:20 +10:00
Christopher Jones
8058776295 Bump OCI8 version to 3.0 so a PHP 8 PECL release can be made 2020-07-20 18:06:19 +10:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Jens de Nies
58f51f8c75
Added stubs for ext/oci8
Closes GH-5701
2020-07-04 10:56:48 +02:00
Jens de Nies
45475c2e21 Deprecate function aliases in oci8 extension.
Closes GH-5589
2020-06-08 00:23:38 +02:00
Nikita Popov
406c95758d Remove some uses of zend_inline_hash_func
There's no need to force-inline the hashing for all of these.
2020-05-15 10:14:22 +02:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Christopher Jones
1f84f2a766 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-09 20:55:21 +11:00
Christopher Jones
99f1f3dedf Add oci_set_call_timeout() and bump version to 2.10.0 2018-12-09 20:55:04 +11:00
Christopher Jones
3da368be2e Merge branch 'PHP-7.2' into PHP-7.3 2018-12-09 12:17:04 +11:00
Christopher Jones
4246702406 Enable Oracle Database DBOP tracing attribute 2018-12-09 12:16:47 +11:00
Christopher Jones
03f6b16de7 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-09 11:30:15 +11:00
Christopher Jones
216d6592e1 Convert some parameter parsing to the Fast Parameter Parsing API 2018-12-09 11:28:04 +11:00
Christopher Jones
e355e55e01 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-08 19:24:59 +11:00
Christopher Jones
dd0a8091f4 Fix resource warning value 2018-12-08 19:24:32 +11:00
Christopher Jones
de9f64f5dd Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  When releasing an oci8 connection always set the resource to null.
2018-12-08 18:51:13 +11:00
KoenigsKind
3c91851874 When releasing an oci8 connection always set the resource to null. 2018-12-08 18:49:12 +11:00
Christopher Jones
171389b435 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-07 23:20:27 +11:00
Christopher Jones
b797818e09 Simplify based on feedback from nikic 2018-12-07 23:07:37 +11:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Christopher Jones
9e56a3373e Terminate smart string correctly
This is related to Zend VM regression bug #75881.  The regression was fixed in the VM, so there is no user visible change from the termination correction.
2018-09-24 20:52:58 +10:00
Christopher Jones
91954c24da Make usable for PECL OCI8 release for PHP 7.x 2018-09-24 20:05:54 +10:00
Christopher Jones
338802b543 Remove $id from phpinfo as already done in PHP-7.3 2018-09-24 16:52:17 +10:00
Christopher Jones
37652336c7 And strip trailing tabs too... 2018-09-24 16:38:39 +10:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
9a01fe712a Fixed few ext/oci8 bugs 2017-09-20 16:46:04 +03:00