Commit Graph

1681 Commits

Author SHA1 Message Date
Simon Wisselink
254b5cabee Dropped remaining references to removed PHP-support in Smarty 4 from docs, lexer and security class. 2022-09-27 12:21:01 +02:00
Raimondas Rimkevičius
1b556c7077 Use __DIR__ instead of dirname(__FILE__) (#817) 2022-09-27 12:03:34 +02:00
Simon Wisselink
4550fc0339 Using PHP functions as modifiers now triggers a deprecation notice (#814)
Fixes #813
2022-09-23 00:09:00 +02:00
Scott Newton
4fc39d59a5 Bug fix for underscore in template name (#581)
* Corrected bug #578, where underscore characters were being stripped from template names when using a custom resource
* Increased the maximum template name length to 127 characters when using a custom resource
2022-09-22 23:56:18 +02:00
Alec Smecher
0fb29024e7 #155 Adapt Smarty upper/lower functions to be codesafe (e.g. for Turkish locale) (#586)
* Implemented locale safe strotoupper, strolower and ucfirst functions for translating user string to filenames etc.

Fixes #155

Co-Authored-By: Alexkurd <7689609+Alexkurd@users.noreply.github.com>
2022-09-22 23:32:55 +02:00
Simon Wisselink
612bd3f657 Fixed PHP8.1 deprecation errors in strip_tags (#803) 2022-09-22 14:55:20 +02:00
Mathias
b91c04bfcf Fixed PHP8.1 deprecation errors passing null to parameter in trim (#807)
Fixed a PHP 8.1 deprecation error:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in cacheresource_keyvaluestore.php on line 247 and in cacheresource_keyvaluestore.php on line 431
2022-09-22 14:29:51 +02:00
Simon Wisselink
c53342c9fc Silence deprecation errors for strtime in PHP8.1 or higher
Fixes #672 (#811)
2022-09-22 14:11:36 +02:00
Jonathan Stoll
45345e75ec Fix Variable Usage (#808)
Fix Variable Usage in Exception message when unable to load subtemplate
2022-09-21 21:54:41 +02:00
Storyxx
db80246b58 fix compilation for caching templates (#801) 2022-09-18 17:15:56 +02:00
Hypolite Petovan
d683641f90 Fix wrong indentation in libs/plugins/modifier.capitalize.php (#802) 2022-09-18 11:14:59 +02:00
Simon Wisselink
e2e68b3622 clean output buffer for Throwable instead of just Exception (#797)
Fixes #514
2022-09-14 13:47:36 +02:00
Simon Wisselink
c693d81370 version bump 2022-09-14 12:58:59 +02:00
Simon Wisselink
813c83f7a3 Fixed unselected year/month/day not working in html_select_date
Fixes #395
2022-09-14 12:44:37 +02:00
Simon Wisselink
55ea25d1f5 Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks
Fixes #454
2022-09-14 11:38:18 +02:00
Simon Wisselink
d304d349b4 Fixed PHP8.1 deprecation errors in capitalize modifier
Fixes #789
2022-09-13 12:19:44 +02:00
Simon Wisselink
5479e3362c Fixed use of rand() without a parameter in math function (#795)
* Fixed use of `rand()` without a parameter in math function
Fixes #794
2022-09-12 12:13:42 +02:00
Simon Wisselink
f8f97b4e2d Fixed PHP8.1 deprecation errors in upper modifier #788 2022-09-10 12:34:20 +02:00
Mark Fettig
1bc7c722a3 address PHP 8.1 'explode', 'number_format', and 'replace' deprecations (#755) 2022-09-09 22:39:24 +02:00
Simon Wisselink
ed454551a3 version bump 2022-08-01 23:57:36 +02:00
Simon Wisselink
f4b26a3cbf Fixed second param of unescape modifier (#778)
Fixes #777
2022-08-01 23:49:19 +02:00
Simon Wisselink
20a8026ccd Merge branch 'fix-issue-549-v3' of github.com:AnrDaemon/smarty into AnrDaemon-fix-issue-549-v3 (#771) 2022-07-19 22:55:07 +02:00
Simon Wisselink
d6ac3297df Merge branch 'master' of github.com:JonisoftGermany/smarty into JonisoftGermany-master 2022-07-17 00:53:25 +02:00
Simon Wisselink
560475a2f2 Do not use obsolete smarty properties '_dir_perms', '_file_perms', 'plugin_search_order' in our own code. (#772) 2022-07-17 00:13:57 +02:00
Gunnar Kreitz
382d66305d Fix PHP 8.1 htmlspecialchars deprecation (#766) 2022-07-14 23:51:26 +02:00
Simon Wisselink
78f0cf5f65 version bump 2022-05-17 14:56:26 +02:00
Simon Wisselink
05f1a7deda Replace '*/' in user supplied input in C-style comments with '* /'. 2022-05-16 12:34:49 +02:00
Simon Wisselink
a6711b3833 Merge pull request #727 from liborm85/escape-modifier-fix
PHP 8.1: fix deprecation in escape modifier
2022-04-26 22:11:33 +02:00
Jorge Sá Pereira
962f266483 Fix PHP 8.1 deprecated warning when calling rtrim
Fixes - Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
2022-03-10 02:06:00 +00:00
Libor M
a2e1df1768 PHP 8.1: fix deprecation in escape modifier 2022-02-08 13:30:19 +01:00
Simon Wisselink
3cc56392c6 prevent float to int cast deprecation warning in truncate modifier
Fixes #699
2022-02-06 22:20:05 +01:00
Simon Wisselink
f90348971b Merge pull request #722 from kochichi/bugfix/721
math equation return warning: max(x, y)
2022-02-06 21:54:54 +01:00
Simon Wisselink
265cf4f3bc version bump 2022-02-06 21:34:26 +01:00
Pavel Kochman
02633ecaba math equation return warning: math: illegal character for : {math equation="max(x, y)" x=$x y=$y} 2022-02-04 21:03:25 +01:00
Thomas A. Hirsch
277648b81c Cherry-picked from da76d927ed
Co-Authored-By: Thomas BACCELLI <tbaccelli@gmail.com>
2022-01-18 15:56:23 +01:00
Thomas A. Hirsch
8d3a7af308 Cherry-picked from da76d927ed
Co-Authored-By: Thomas BACCELLI <tbaccelli@gmail.com>
2022-01-18 15:56:23 +01:00
Simon Wisselink
995b7eb36f version bump 2022-01-18 00:17:17 +01:00
Claas Augner
059bea274c Support multiple operators in math equations (#708)
* fix(math): fix equation regexp

Fixes #702.
2022-01-18 00:10:17 +01:00
Simon Wisselink
ace1c8e90f version bump 2022-01-10 10:52:13 +01:00
Simon Wisselink
19ae410bf5 Merge pull request from GHSA-4h9c-v5vg-5m6m
* Prevent evasion of the static_classes security policy.

* Updated deprecated exception expectations.
2022-01-10 10:48:27 +01:00
Simon Wisselink
a535445dfd version bump 2022-01-10 00:09:06 +01:00
Simon Wisselink
215d81a9fa Merge pull request from GHSA-29gp-2c3m-3j6m
* Temporary fix. Waiting for CVE

* Add CVE
2022-01-10 00:01:43 +01:00
Simon Wisselink
23be620fc8 version bump 2022-01-09 23:20:44 +01:00
Simon Wisselink
c7576eb1a1 Rewrote the mailto function to not use eval when encoding with javascript 2022-01-09 23:15:25 +01:00
Darek Krzysztofiak
cd962280ce Fix for php 8.0 (#687)
* Fix PHP 8.0
$parts must be an array, because the argument for count() must be countable, mb_split() returns an array or a boolean.
2021-12-03 17:13:52 +01:00
Simon Wisselink
e603269eda version bump 2021-11-25 22:18:24 +01:00
Simon Wisselink
ffb2fd923b Update README.md. Fix references to Smarty3. Get rid of old changelog-like files. 2021-10-13 22:49:43 +02:00
Simon Wisselink
d0863f0d0b version bump 2021-10-13 12:16:19 +02:00
Simon Wisselink
39b69f0142 Feature/php8 support (#629)
Adds support for PHP8.0, dropping support for PHP7.0 and below.

Backwards incompatible changes:
- Dropped support for php asp tags in templates (removed from php since php7.0)
- Dropped deprecated API calls that where only accessible through SmartyBC
- Dropped support for {php} and {include_php} tags and embedded PHP in templates. Embedded PHP will now be passed through as is.
- Removed all PHP_VERSION_ID and compare_version checks and conditional code blocks that are now no longer required
- Dropped deprecated SMARTY_RESOURCE_CHAR_SET and SMARTY_RESOURCE_DATE_FORMAT constants
- Dropped deprecated Smarty::muteExpectedErrors and Smarty::unmuteExpectedErrors API methods
- Dropped deprecated $smarty->getVariable() method. Use $smarty->getTemplateVars() instead.
- $smarty->registerResource() no longer accepts an array of callback functions

See the changelog for more details.

Switched CI from Travis to Github CI.
2021-10-13 12:15:17 +02:00
Simon Wisselink
7c4354e7b8 version bump 2021-10-13 12:04:29 +02:00