Commit graph

42571 commits

Author SHA1 Message Date
Kalle Sommer Nielsen
b3124dbe12 Fix line endings, getting a little annoyed with VS' warning about mismatch 2016-08-05 11:12:51 +02:00
Kalle Sommer Nielsen
1740823864 Fixed bug #68547 (Exif Header component value check error) (Patch by sjh21a at gmail dot com)
This patch changes processing a little and causes some crafted tags to not be parsed and generate a warning.

This is a slight BC break from earlier versions, since it will no longer return the tags of that it was mismatching (see bug68799.phpt), namely the "WINXP" section and the "Author" tag is no longer returned due to this. Although this BC break is merely only for crafted tags, this can also have some real life effects on pictures re-saved from editors that can cause bad exif data writes, so lets keep it here.
2016-08-05 10:03:14 +02:00
Kalle Sommer Nielsen
aaa136e25d Added support for Sony pictures in EXIF as per requested in bug #72735
Sony is a little more interesting, as it is have a large range of tags it support in different models. For now I have added all the tags found within the Exif.Sony1 namespace.
2016-08-05 07:45:02 +02:00
Kalle Sommer Nielsen
93c0e97602 Split this test up to a 64bit version for more coverage
The 32bit version does not have the 64bit float values here, we already have 3 float tests which I guess will do for now at least
2016-08-05 07:15:34 +02:00
Nikita Popov
65b6f2013b Fix exif_imagetype() test after zpp change 2016-08-04 22:27:42 +02:00
Nikita Popov
919d208626 Merge branch 'PHP-7.1' 2016-08-04 14:23:16 +02:00
Ville Hukkamäki
318d3b3a3f Implement request #27814
Construct HTTP request headers into smart_str and send whole
request in one go.
2016-08-04 14:20:36 +02:00
Matteo Beccati
3e5dbdc3e8 Merge branch 'PHP-7.1'
* PHP-7.1:
  Clean up FR #72633
  Fixed invalid handle error with Implicit Result Sets and bump OCI8 version.
2016-08-04 09:38:10 +02:00
Matteo Beccati
70698d1566 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Clean up FR #72633
  Fixed invalid handle error with Implicit Result Sets and bump OCI8 version.

Conflicts:
	ext/oci8/package.xml
2016-08-04 09:37:40 +02:00
Matteo Beccati
4003595d60 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Clean up FR #72633
2016-08-04 09:30:48 +02:00
Matteo Beccati
d3a8e107ac Clean up FR #72633 2016-08-04 09:28:58 +02:00
Christopher Jones
0781f512c3 Fixed invalid handle error with Implicit Result Sets and bump OCI8 version. 2016-08-04 17:14:19 +10:00
Christopher Jones
eec630d068 Merge branch 'PHP-7.1' 2016-08-04 17:02:44 +10:00
Christopher Jones
6aeb9ba447 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-04 17:02:08 +10:00
Christopher Jones
2b7a699acd Fixed invalid handle error with Implicit Result Sets 2016-08-04 17:01:57 +10:00
Christopher Jones
78488a54c8 Fixed invalid handle error with Implicit Result Sets and bump OCI8 version. 2016-08-04 16:55:54 +10:00
Stanislav Malyshev
2eb182b35d Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #72716 - initialize buffer before read
2016-08-03 23:04:07 -07:00
Stanislav Malyshev
67264ebc70 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #72716 - initialize buffer before read
2016-08-03 23:03:15 -07:00
Stanislav Malyshev
b57474f23e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #72716 - initialize buffer before read

Conflicts:
	ext/standard/ftp_fopen_wrapper.c
2016-08-03 23:00:32 -07:00
Stanislav Malyshev
4f861b6071 Fix bug #72716 - initialize buffer before read 2016-08-03 22:59:42 -07:00
Kalle Sommer Nielsen
4d90b1b5ea Use 'p' to validate a path in exif_imagetype() (like the other exif function already does) 2016-08-03 23:57:51 +02:00
Anatol Belski
662e5ae951 improve the check, avoid strlen on NULL 2016-08-03 12:29:03 -07:00
Kalle Sommer Nielsen
835ef14979 Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
Before this patch, exif_process_IFD_in_MAKERNOTE() would return false, then causing the rest of the EXIF parsing to be interrupted. This is a regression from earlier which was most likely a part of a security fix for MAKERNOTE.

The new behavior is to instead of stopping to parse, to continue so we can still fetch data like thumbnail and GPS, thrus allowing yet unsupported formats to parse. If EXIF's debugging mode is enabled, a notice will display in case we do not match against a valid MAKERNOTE signature.

This should temporarily fix bug #72682 (exif_read_data() fails to read all data for some images) until I get around to debug it further.
2016-08-03 12:29:03 -07:00
Jakub Zelenka
9ed2a70757 Merge branch 'PHP-7.1' 2016-08-03 20:07:57 +01:00
Jakub Zelenka
6822af2e73 Do not add already added object to the internal OpenSSL table
This fixes OpenSSL 1.1 where adding object with OID that has been
already added causes an error - preventing of duplication.
2016-08-03 20:01:41 +01:00
Remi Collet
456e10eb9b - add a test for makernote (#72682)
- reduce image size
- add panasonic.jpg sample
2016-08-03 18:33:26 +02:00
Anatol Belski
be8f1580cf Merge branch 'PHP-7.1'
* PHP-7.1:
  improve the check, avoid strlen on NULL
2016-08-03 18:30:18 +02:00
Anatol Belski
8f0baa9707 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  improve the check, avoid strlen on NULL
2016-08-03 18:29:42 +02:00
Anatol Belski
138689ffb7 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  improve the check, avoid strlen on NULL
2016-08-03 18:28:48 +02:00
Anatol Belski
9667ee4f72 improve the check, avoid strlen on NULL 2016-08-03 18:26:29 +02:00
Anatol Belski
8830b3d020 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
  update NEWS
  Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
2016-08-03 17:40:38 +02:00
Anatol Belski
0e82eb48cb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  update NEWS
  Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
2016-08-03 17:39:22 +02:00
Kalle Sommer Nielsen
d5796fb298 Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
Before this patch, exif_process_IFD_in_MAKERNOTE() would return false, then causing the rest of the EXIF parsing to be interrupted. This is a regression from earlier which was most likely a part of a security fix for MAKERNOTE.

The new behavior is to instead of stopping to parse, to continue so we can still fetch data like thumbnail and GPS, thrus allowing yet unsupported formats to parse. If EXIF's debugging mode is enabled, a notice will display in case we do not match against a valid MAKERNOTE signature.

This should temporarily fix bug #72682 (exif_read_data() fails to read all data for some images) until I get around to debug it further.

(cherry picked from commit aabcb5481d)
2016-08-03 17:36:00 +02:00
Kalle Sommer Nielsen
c6bd054b86 Fixed bug #72682 (exif_read_data() fails to read all data for some images)
This is fixed by adding DJI signatures to the MAKERNOTE and its supported tags, list is credits to ExifTool documentation.
2016-08-03 17:33:18 +02:00
Kalle Sommer Nielsen
aabcb5481d Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
Before this patch, exif_process_IFD_in_MAKERNOTE() would return false, then causing the rest of the EXIF parsing to be interrupted. This is a regression from earlier which was most likely a part of a security fix for MAKERNOTE.

The new behavior is to instead of stopping to parse, to continue so we can still fetch data like thumbnail and GPS, thrus allowing yet unsupported formats to parse. If EXIF's debugging mode is enabled, a notice will display in case we do not match against a valid MAKERNOTE signature.

This should temporarily fix bug #72682 (exif_read_data() fails to read all data for some images) until I get around to debug it further.
2016-08-03 17:05:31 +02:00
Remi Collet
ada7ef6a11 Merge branch 'PHP-7.1'
* PHP-7.1:
  Minor revert of be3640150c
2016-08-03 14:28:45 +02:00
Remi Collet
f9ce8aa75b Minor revert of be3640150c
On 32bits this may cause php to hangs forever.
2016-08-03 14:27:46 +02:00
Remi Collet
9c728981ca Merge branch 'PHP-7.1'
* PHP-7.1:
  fix paths in tests
2016-08-03 14:24:46 +02:00
Remi Collet
a70ca97c18 fix paths in tests 2016-08-03 14:24:35 +02:00
Remi Collet
593c1542e8 Merge branch 'PHP-7.1'
* PHP-7.1:
  clean removed functions (since they are alias)
2016-08-03 12:59:21 +02:00
Remi Collet
8b7f594a2b clean removed functions (since they are alias) 2016-08-03 12:59:14 +02:00
Remi Collet
90ceb6ebf8 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix 32bits tests
2016-08-03 12:56:52 +02:00
Remi Collet
cff668f7a7 Fix 32bits tests
Notice: this warning is only raise since rand is an alias to mt_rand
2016-08-03 12:56:07 +02:00
Anatol Belski
fad3f936ac fix ts build 2016-08-03 12:16:42 +02:00
Kalle Sommer Nielsen
de3be17703 Merge branch 'master' of git.php.net:php-src 2016-08-03 11:59:58 +02:00
Kalle Sommer Nielsen
fbb1690198 Fixed Redhat bug #1362571 (PHP not returning full results for exif_read_data function)
There are two factors for this bug fix:
 - First of all, the maximum nesting level has been increased to 150 (previously 100), I'm not sure how much an impact this will have, but increasing this value also seems to resolve PHP bug #66443 (Corrupt EXIF header: maximum directory nesting level reached for some cameras.)
  - Second, this adds support for most common Panasonic EXIF tags, again this list is based off the Exiv2 website

Note about Panasonic's format:
From what I could find, then the offset was always 12 bytes for such, the signature always had the 'P' capitalized, and the rest lower cased, followed by 3 NULL bytes

@Remi, can you review this? I'm gonna look into Sony (which is huge btw!) and your patch next
2016-08-03 11:59:30 +02:00
Remi Collet
0c94a93057 Merge branch 'PHP-7.1'
* PHP-7.1:
  add skipif (needs json)
2016-08-03 11:03:35 +02:00
Remi Collet
60bb15d8a1 add skipif (needs json) 2016-08-03 11:03:22 +02:00
Kalle Sommer Nielsen
d9613a850f Merge branch 'master' of git.php.net:php-src 2016-08-03 10:02:54 +02:00
Kalle Sommer Nielsen
9c8c37854e Fixed bug #72735 (Samsung picture thumb not read (zero size))
It seems like there is no maker data for "Samsung", this causes the IDF tag parsing to fail, and it bails early on, despite there still is valid remaining data in image, such as the thumbnail data as reported in the bug.

I used the Exiv2 website as a reference guide for tags that's specific to Samsung's EXIF data, which should also mean that we will be able to name some of those tags more specifically now.

I have chosen again not to commit this to other branches, simply because I'm not 100% sure on the byte order and offsets for Samsung, I did some research and it seems like there are many variants, but this (very copy/pasted), entry works for this particular image and does not break any other tests. This does add a new feature I suppose, while also fixing a bug, but I will leave it to the other branch RMs to decide on how far down they will want to merge this.
2016-08-03 10:02:22 +02:00