summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Always use PCRE for mbstring.http_output_conv_mimetypesNikita Popov2020-09-081-72/+1
| | | | | | Instead of using either oniguruma or pcre depending on which is available. We always have PCRE, so use it. This ensures consistent behavior.
* Promote warnings to errors for set(raw)cookie()George Peter Banyard2020-09-087-140/+248
| | | | Closes GH-5819
* Require $method parameter in openssl_seal/openssl_openNikita Popov2020-09-088-72/+36
| | | | | | | | RC4 is considered insecure, and it's not possible to change the default of these functions. As such, require the method to be passed explicitly. Closes GH-6093.
* Promote warnings in exifNikita Popov2020-09-082-4/+47
| | | | | | The only thing that can promoted are the path-related checked. Everything else is input dependent and error-suppressing these functions is both the typical and the recommended usage.
* Merge branch 'PHP-7.4'Nikita Popov2020-09-081-3/+3
|\ | | | | | | | | * PHP-7.4: Fixed bug #80077
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-09-081-3/+3
| |\ | | | | | | | | | | | | * PHP-7.3: Fixed bug #80077
| | * Fixed bug #80077Nikita Popov2020-09-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting from the bug report: > The domain names passed to getmxrr() do not contain a trailing dot. > DNS lookups which do not find records will (depending on the local > resolver config) try again by adding the local domain to the end of > the searched host/domain. In many environments there's an mx record > for any subdomain of the local domain and the MX query will return > a hit. But the test expects no hit. So the test fails when checking > that "qa.php.net" does not have an MX record in DNS. In our local > environment the resolver falls back to also check qa.php.net.kippdata.de > which does have an MX record. Using "qa.php.net." instead of "qa.php.net" > should fix this for everyone.
* | | decbin/decoct/dechex optimization.Dmitry Stogov2020-09-081-3/+39
| | |
* | | Catch type errors so test completes and doesn't diffChristopher Jones2020-09-081-24/+30
| | |
* | | Accept updated error number generated by the latest Oracle versionChristopher Jones2020-09-081-1/+1
| | |
* | | Yes, and mask the dir path too.Christopher Jones2020-09-081-2/+2
| | |
* | | Fix parsing regression from PHP 7Christopher Jones2020-09-082-6/+16
| | |
* | | Add "const". Move constant strings to read-only memory.Dmitry Stogov2020-09-0711-16/+16
| | |
* | | Promote warnings to exceptions in ext/intlMáté Kocsis2020-09-0718-146/+272
| | | | | | | | | | | | Closes GH-5972
* | | Fix UNKNOWN default values in various extensionsMáté Kocsis2020-09-0726-187/+188
| | | | | | | | | | | | Closes GH-6075
* | | Fix UNKNOWN default values in ext/standardMáté Kocsis2020-09-0725-249/+270
| | | | | | | | | | | | Closes GH-6026
* | | Merge branch 'PHP-7.4'Nikita Popov2020-09-071-3/+8
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Don't leave behind temporary file in bug70362.phpt
| * | Don't leave behind temporary file in bug70362.phptNikita Popov2020-09-071-3/+8
| | |
| * | Fixed bug #80046Nikita Popov2020-09-032-5/+12
| | | | | | | | | | | | | | | We already protect against optimizing away loop frees in DFA pass, but not in block pass.
* | | Drop support for crypt() without explicit saltNikita Popov2020-09-074-38/+13
| | | | | | | | | | | | | | | | | | | | | crypt() without salt generates a weak $1$ MD5 hash. It has been throwing a notice since 2013 and we provide a much better alternative in password_hash() (which can auto-generate salts for strong password hashes), so keeping this is just a liability.
* | | Allocate temporary PCRE match data using ZMMNikita Popov2020-09-073-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a separate general context that uses ZMM as allocator and use it to allocate temporary PCRE match data (there is still one global match data). There is no requirement that the match data and the compiled regex / match context use the same general context. This makes sure that we do not leak persistent memory on bailout and fixes oss-fuzz #25296, on which half the libfuzzer runs currently get stuck.
* | | Private/public split curl headerNikita Popov2020-09-078-143/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | To allow exporting the php_curl.h header containing curl class entries, split off a separate curl_private.h header with all the implementation details. We may move or expose additional APIs in php_curl.h on an as-needed basis.
* | | Remove some unnecessary HAVE_EXTNAME guardsNikita Popov2020-09-079-48/+2
| | | | | | | | | | | | | | | | | | | | | | | | A recurring pattern in old extension: Putting the whole source code behind HAVE_EXTNAME. This is pointless, as the code is only compiled if the extension is enabled. This removes a couple of them, but not all.
* | | Opcache JIT, code simplification for Haiku.David Carlier2020-09-072-24/+10
| | | | | | | | | | | | | | | | | | | | | More straightforward approach to get the path of the current PHP process. Closes GH-6082.
* | | Throw on invalid mb_http_input() typeNikita Popov2020-09-072-3/+20
| | |
* | | Improve handling of `#[` attributes in `php -a`Tyson Andre2020-09-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `php -a` treats lines starting with `#` as comments when deciding if the provided statement is valid. So it passed `#[MyAttr]` to the parser after the user hits enter, causing a syntax error for multi-line statements.. With this patch, the following snippet is parsed correctly ``` php > #[Attr] php > function x() { } php > var_export((new ReflectionFunction('x'))->getAttributes()[0]->getName()); 'Attr' ``` Followup to GH-6085 Closes GH-6086
* | | Improve handling of `#[` in `php -a`Tyson Andre2020-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHP treats `#ini_setting=value` as a call to `ini_set('ini_setting', 'value')`, and silently skips undeclared settings. This is a problem due to `#[` becoming supported attribute syntax: - `#[Attr] const X = 123;` (this is not a valid place to put an attribute) This does not create a constant. - `#[Attr] function test($x=false){}` also contains `=`. This does not create a function. Instead, only treat lines starting with `#` as a special case when the next character isn't `[` Closes GH-6085
* | | Handle null encoding in mb_http_input()Nikita Popov2020-09-042-10/+29
| | |
* | | Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)Derick Rethans2020-09-043-9/+32
| | |
* | | Promote warnings to exceptions in ext/ldapMáté Kocsis2020-09-044-106/+109
| | | | | | | | | | | | Closes GH-6065
* | | Use ZPP instead of custom type checksMáté Kocsis2020-09-0430-430/+302
| | | | | | | | | | | | We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
* | | Use the canonical order of types in array|string ZPP error messagesMáté Kocsis2020-09-049-9/+9
| | |
* | | Extract common flock codeGeorge Peter Banyard2020-09-043-41/+27
| | | | | | | | | | | | | | | | | | As SPL is currently a copie of the code in file.c Closes GH-6069
* | | Release call trampolines in zpp fccNikita Popov2020-09-043-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call trampoline release it immediately and force zend_call_function to refetch it. This may require additional callability checks if __call is used, but avoids the need to carefully free fcc values in all internal functions -- in some cases this is not simple, as a type error might be triggered by a later argument in the same zpp call. This fixes oss-fuzz #25390. Closes GH-6073.
* | | Make gethostbyname() test more liberalNikita Popov2020-09-041-2/+2
| | | | | | | | | | | | This returns 127.0.1.1 on travis bionic.
* | | Avoid unnecessary IP initiliaization on trace linkingDmitry Stogov2020-09-043-41/+116
| | |
* | | Cleanup macro/function namesDmitry Stogov2020-09-043-134/+136
| | |
* | | Load EX(opline) in one instuction if possibleDmitry Stogov2020-09-031-2/+1
| | |
* | | Reorder DynAsm macros (no other changes)Dmitry Stogov2020-09-031-74/+74
| | |
* | | Error promotions in SPLGeorge Peter Banyard2020-09-039-41/+47
| | | | | | | | | | | | | | | | | | | | | Warning to Error promotion and a Notice to Warning promotion to align with the behaviour specified in the Reclassify Engine Warnings RFC. Closes GH-6072
* | | Warning to Error promotion in ext/standardGeorge Peter Banyard2020-09-0310-52/+54
| | | | | | | | | | | | | | | | | | Those should be the last ones other than set(raw)cookie() Closes GH-5814
* | | If we don't know the return address, just escape to VM, instead of adding ↵Dmitry Stogov2020-09-033-24/+24
| | | | | | | | | | | | | | | | | | side exit. Remove unnecessary exception checks.
* | | Use symbolic constants in Japanese kana conversion code (not magic numbers)Alex Dowad2020-09-031-13/+16
| | | | | | | | | | | | Also correct misspelling of 'hiragana' as 'hirangana' at the same time.
* | | Remove unused 'from' field from mbfl_buffer_converter structAlex Dowad2020-09-032-6/+4
| | |
* | | Add comment to mbfilter_tl_jisx0201_jisx0208.hAlex Dowad2020-09-031-0/+2
| | | | | | | | | | | | Explain the 'ZEN' and 'HAN' in symbolic constant names.
* | | Remove unneeded function mbfl_filt_ident_common_dtorAlex Dowad2020-09-0353-90/+4
| | | | | | | | | | | | | | | This was the default destructor for mbfl_identify_filter structs, but there's nothing we actually need to do to those structs before freeing them.
* | | Remove unneeded function mbfl_filt_conv_common_dtorAlex Dowad2020-09-0369-208/+214
| | | | | | | | | | | | | | | | | | | | | This is a default destructor for mbfl_convert_filter structs. The thing is: there isn't really anything that needs to be done to those structs before freeing them. The default destructor just zeroed out some fields, but there's no reason why we should actually do that.
* | | Refactor mbfl_convert.cAlex Dowad2020-09-035-136/+65
| | |
* | | Fix Windows buildChristoph M. Becker2020-09-032-2/+2
| | |
* | | Try to fix windows buildNikita Popov2020-09-031-2/+2
| | |