932 Commits

Author SHA1 Message Date
nicolaasuni
7956f5e378 Update version and changelog 6.7.8 2024-12-13 19:31:40 +00:00
nicolaasuni
e9b6d5864e Merge branch 'improve-svg-detection-regex' 2024-12-13 19:25:44 +00:00
Manuel Capinha
e88f371c90 remove namespace from svg regex 2024-12-04 10:58:29 +00:00
Manuel Capinha
122a2c61dc improve SVG detection by checking for (mandatory) namespace and closing tag 2024-11-26 11:54:15 +00:00
François-Xavier de Guillebon
ab7f779e33
use late state binding now that minimum PHP version is 5.5 2024-11-18 09:35:33 +01:00
Nicola Asuni
cfbc0028cc
Merge pull request #757 from tecnickcom/develop
New release version
6.7.7
2024-10-26 13:15:02 +01:00
nicolaasuni
696d233385 Bump version 2024-10-26 13:08:33 +01:00
nicolaasuni
17fe9597fb Update regexp to fix CVE-2024-22641 2024-10-26 13:08:26 +01:00
Nicola Asuni
01c96e89ef
Merge multiple PRs (#756)
* Ayesh: [PHP 8.4] Fix: Curl CURLOPT_BINARYTRANSFER deprecated #675

* THenkeDE: SVG detection fix for inline data images #646

* bruno-farias:  Fix count svg #647
2024-10-26 12:13:18 +01:00
Nicola Asuni
dad9e915a0
Multiple PRs (#755)
* Update tcpdf.php

Since the version 6.7.4, the "0" is considered like empty string and not displayed

* Update tcpdf.php

Co-authored-by: William Desportes <williamdes@wdes.fr>

* Fixed handling of transparency in PDF/A mode in addExtGState method

The condition allowed to add ExtGState in all PDF/A modes and disallowed
in default mode.

This fix inlines the condition with setExtGState to allow transparency
parameters for non-PDF/A and PDF/A > 1 documents.

The state condition is copied from 'setExtGState'.

* Encrypt /DA string when document is encrypted

When document is encrypted then /DA string must be encrypted,
without this Acrobat cannot allow fill form fields.

* Improve quality of generated seed, avoid potential security pitfall

* Try to use random_bytes() first if it's available
* Do not include the server parameters in the generated seed, as
they might contain sensitive data

As all current usages of getRandomSeed() directly hash the seed,
there should be no BC breaking changes.

The main source of entropy is more than enough on its own if
random_bytes() or openssl_random_pseudo_bytes() are available.

* Fix bug on _getannotsrefs when there are empty signature appearances but not other annot on a page

* Fix SVG coordinate parser that caused drawing artifacts

* Remove usage of xml_set_object() function

The xml_set_object() function will be deprecated in PHP 8.4 as well as
passing non-callable strings to the xml_set_*_handler() functions.

Instead of using xml_set_object(), the string method names in
xml_set_element_handler() and xml_set_character_data_handler() should be
replaced with callables.

- https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

---------

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: jlouche <61839660+jlouche@users.noreply.github.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: stollr <christian.stoller@mail.de>
Co-authored-by: Robert Jędrzejczyk <robert@prog.olsztyn.pl>
Co-authored-by: Andreas Erhard <andreas.erhard@i-med.ac.at>
Co-authored-by: Alejandro Precioso <aprecioso@bigtree.com.ar>
Co-authored-by: davidrod <david@gassiotllobet.com>
Co-authored-by: sslldavid <119080321+sslldavid@users.noreply.github.com>
Co-authored-by: Alejandro <aprecioso@gmail.com>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-10-26 10:29:48 +01:00
nicolaasuni
4cf1ab192e fix control for all PHP versions 6.7.6 2024-10-06 11:54:28 +01:00
nicolaasuni
bfa7d2b6d4 Forbid access to parent folder in HTML images 2024-10-06 11:38:38 +01:00
nicolaasuni
951eabf033 Bump version 6.7.5 2024-04-20 18:25:10 +01:00
nicolaasuni
38b75a8652 Update GitHub actions 2024-04-20 18:14:20 +01:00
nicolaasuni
820383ac06 Fix comment 2024-04-20 18:06:26 +01:00
Josh
05f3a28f4a
fix: CSV-2024-22640 (#712)
Add possessive quantifiers to the regex to prevent catastrophic backtracking.
2024-04-20 18:03:05 +01:00
nicolaasuni
d4adef47ca Update GitHub workflows 6.7.4 2024-03-25 23:56:24 +00:00
nicolaasuni
82fc97bf1c Squash multiple fixes 2024-03-25 23:52:22 +00:00
nicolaasuni
8115ff636a Fix SPDX license ID (#591) and update min PHP version to 5.5.0 2024-03-25 23:50:00 +00:00
nicolaasuni
2fb1c01bc3 Update workflow 2022-12-17 10:46:01 +00:00
nicolaasuni
e3cffc9bcb Bump version 6.6.2 2022-12-17 10:28:59 +00:00
nicolaasuni
b133c47e93 Fix syntax error 2022-12-17 10:26:06 +00:00
nicolaasuni
e3d45a6853 Ensure return type is always array 2022-12-17 10:19:28 +00:00
Philippe Jausions
8872a9cdae
Add ability to run tests on various operating systems (#566)
Co-authored-by: Philippe Jausions <Philippe.Jausions@11abacus.com>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-17 10:14:35 +00:00
Bart Driessen
ef356f0bc7
Avoid a deprecated error from PHP8.1 (#573)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
2022-12-17 09:59:09 +00:00
nicolaasuni
a336b531f6 Bump version 6.6.1 2022-12-12 14:42:28 +00:00
Michael Voříšek
37aa6eeb73
Add PHPStan and fix level 1 errors (#307)
* Add PHPStan level 1

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-12 14:38:07 +00:00
nicolaasuni
154bba45ff Bump version 6.6.0 2022-12-06 09:28:13 +00:00
Paul Holden
80dbfa867c
Multi-byte character support for filename during output (#561). (#562)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 09:22:10 +00:00
François-Xavier de Guillebon
e8a76e1559
Fix garbage collection (#509)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 09:00:58 +00:00
Bayram Arslan
ca70b94577
FIX: PDF417 corrupt output problem, solution set bcmath scale parameter to zero (#534)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:55:12 +00:00
Niklas
29c3748b5f
Fix TypeError: count() in PHP8 (#556)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:44:45 +00:00
Dimitri Mikropoulos
6da8a0f8b6
Fix-getHTMLFontUnits (#547)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:39:18 +00:00
Remi Collet
59c78266df
improved embedded image in HTML allowing src="data:..." format (#552)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:28:15 +00:00
atomiix
d7da13a0c0
Fix image abscissa when in RTL (#510)
Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:23:40 +00:00
Julien Maumené
f794192a90
fix: php 8.1 notices (#548)
PHP Deprecated:  Implicit conversion from float 31.5 to int loses precision in /var/www/html/vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php on line 891
PHP Deprecated:  Implicit conversion from float 3.5 to int loses precision in /var/www/html/vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php on line 895

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 08:13:09 +00:00
Дилян Палаузов
d3178394ff
Optimize PNG files (#563)
by calling
  for i in `find -name '*.png'`; do optipng -o7 -zm9 $i; done

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 07:48:43 +00:00
Philippe Jausions
0df767ffad
Update documentation for a known issue. (#569)
Closes #568

Co-authored-by: Philippe Jausions <Philippe.Jausions@11abacus.com>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-12-06 07:44:38 +00:00
Simone Pavlovich
288a7cdc4c
Fix for PHP 8.1 (#571)
* Fix for PHP 8.1

If $style is empty, PHP is throwing a warning.You need to set the default as empty string if $style is not set.

* Apply suggestions from code review

Co-authored-by: William Desportes <williamdes@wdes.fr>
2022-12-06 07:39:13 +00:00
nicolaasuni
cc54c15036 Bump version 6.5.0 2022-08-12 08:50:54 +01:00
nicolaasuni
1fb8b6a6c7 Bump version 2022-08-12 08:49:40 +01:00
Richard
5a04f6e0e8
encodeUrlQuery takes into account the port (#493)
In order to take into account the port in the URLs (related to PR #148).

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:44:18 +01:00
Indrek Haav
ff83da807a
Fixing undefined offset error in writeHTML() when last DOM element has display:none (#496)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:37:37 +01:00
Markus Ramšak
a089447257
correct some typehints (#495)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:37:10 +01:00
Joost de Bruijn
1ecad8827a
fix: php 8.1 notices (#481)
* fix: php 8.1 notices

* fix: php5 compatible code

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:30:12 +01:00
Andris Krauze
633b42a099
Fixed: null check for PHP 8.1 (#476)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:29:34 +01:00
Stephen Sigwart
5596537f8f
Fix Infinite Loop in Multicell with Auto Page Breaks Off (#473)
The updated places that used `AcceptPageBreak` assumed that a page break was added and increased X by the margin.  However, if the break wasn't added, it would put the text further to the right to the point that the width because so small or negative and no characters fit, causing an infinite loop.

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:29:02 +01:00
oleibman
56e5dfdf23
GetCssBorderStyle Has Problem When !important Is Specified (#467)
* GetCssBorderStyle Has Problem When !important Is Specified

This is, in particular, a problem for PhpSpreadsheet. See https://github.com/PHPOffice/PhpSpreadsheet/issues/1164. TCPDF thinks that there can be 0, 1, 2, or 3 components to shorthand border style, but there can be more, e.g. !important. Logic is rearranged to allow for more than 3. A new example file is added to demonstrate that the fix works correctly.

* Improved Example

Better code coverage.

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:25:26 +01:00
SonOfHarris
e42b70cb79
Support Apache 2.4 directives in htaccess file (#530)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
2022-08-12 08:14:00 +01:00
Cédric Anne
b5cbcc255c
Remove examples from dist package (#542)
* Remove examples from dist package

* Update composer.json

* Update .gitattributes
2022-08-12 08:10:45 +01:00