Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #1

Merged
merged 132 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
a5934a7
Fixed a unit test that accidentally passed on phpunit < 7 because of …
wisskid Sep 11, 2020
859a09e
Bumped phpdoc @version tag to 3.1.36 (#598)
pH-7 Sep 11, 2020
c295786
Fixes for php8.0.0beta3 (#608)
wisskid Sep 12, 2020
820782c
const fix for usage with comparison operators (#618)
liborm85 Jan 5, 2021
e2b2816
Clarify correct LGPL version.
wisskid Jan 5, 2021
92e05d4
Brought lexer source functionally up-to-date with compiled version (#…
wisskid Jan 6, 2021
f65e7dd
fixed changelog
wisskid Jan 6, 2021
cb42543
Removed unused error_reporting.ini file, updated version number in Sm…
wisskid Jan 8, 2021
2af2a07
version bump
wisskid Jan 8, 2021
63b3c0a
Merge branch 'release/3.1.38'
wisskid Jan 8, 2021
3af2df2
Fix typo in StreamVariableTest.php (#616)
eltociear Jan 8, 2021
fedc127
Mark tests that use sleep calls as slow, so we can ignore them when r…
wisskid Jan 16, 2021
6463519
Prevent access to .template_object when in security mode to prevent P…
wisskid Jan 24, 2021
165f1bd
Fixed Code injection vulnerability by using illegal function names
wisskid Jan 24, 2021
288a54f
Add unit test
wisskid Jan 24, 2021
2543174
Cannot use in Smarty3 yet, revert to @expectedException
wisskid Feb 1, 2021
8fc66e2
Cannot use in Smarty3 yet, revert to @expectedException
wisskid Feb 1, 2021
74cab5a
updated changelog header to security
wisskid Feb 17, 2021
e66e293
Do not push release automatically in make release script, to enable a…
wisskid Feb 17, 2021
c927205
Merge branch 'bugfix/template_object_sandbox_escape'
wisskid Feb 17, 2021
4f634c0
Merge branch 'bugfix/tplfunction_sandbox_escape'
wisskid Feb 17, 2021
3148d40
changelog
wisskid Feb 17, 2021
a21f596
version bump
wisskid Feb 17, 2021
e27da52
Merge branch 'release/3.1.39'
wisskid Feb 17, 2021
e2485fa
Create SECURITY.md
wisskid Feb 21, 2021
290aee6
Update CHANGELOG.md
wisskid Feb 21, 2021
9cde36e
plugins: escape: javascript escaping secure fix
mihaon Feb 28, 2021
039043e
Update modifier.escape.php (#649)
DavidGoodwin Mar 21, 2021
4698dd9
Changelog
wisskid Mar 21, 2021
e3eabe0
Delete uninted file expectException (#664)
mvorisek May 25, 2021
1a68b79
Update README.md (#668)
eltociear Aug 18, 2021
3b0fd82
Merge branch 'escape' of https://github.com/m-haritonov/smarty into m…
wisskid Aug 19, 2021
0ff7ba5
Add changelog
wisskid Aug 19, 2021
770bc4a
Merge branch 'm-haritonov-escape'
wisskid Aug 19, 2021
7c4354e
version bump
wisskid Oct 13, 2021
9d4f830
Merge branch 'release/3.1.40'
wisskid Oct 13, 2021
39b69f0
Feature/php8 support (#629)
wisskid Oct 13, 2021
d0863f0
version bump
wisskid Oct 13, 2021
64a6333
Merge branch 'release/4.0.0-rc.0'
wisskid Oct 13, 2021
ffb2fd9
Update README.md. Fix references to Smarty3. Get rid of old changelog…
wisskid Oct 13, 2021
572cbe5
Make make-release.sh safer by checking for version number.
wisskid Oct 22, 2021
e603269
version bump
wisskid Nov 25, 2021
baebd59
Merge branch 'release/4.0.0'
wisskid Nov 25, 2021
428a701
Feature/add docs (#689)
wisskid Dec 3, 2021
09875a6
changed homepage links in composer.json
wisskid Dec 3, 2021
6983788
Merge branch 'master' of github.com:smarty-php/smarty
wisskid Dec 3, 2021
3a91df7
added links to appndixes, removed unuseful old appendixes
wisskid Dec 3, 2021
cb5efd0
Improve the documentation, bringing it up to date with PHP7/8 and Sma…
wisskid Dec 3, 2021
cd96228
Fix for php 8.0 (#687)
pandarek Dec 3, 2021
56aadc6
Fix a typo in docs (#690)
marclaporte Dec 22, 2021
c7576eb
Rewrote the mailto function to not use `eval` when encoding with java…
wisskid Jan 9, 2022
e6ab346
Merge remote-tracking branch 'origin/master'
wisskid Jan 9, 2022
23be620
version bump
wisskid Jan 9, 2022
29c0e5a
Merge branch 'release/4.0.1'
wisskid Jan 9, 2022
efb416e
Fixed unit tests
wisskid Jan 9, 2022
215d81a
Merge pull request from GHSA-29gp-2c3m-3j6m
wisskid Jan 9, 2022
a535445
version bump
wisskid Jan 9, 2022
6f4f06d
Merge branch 'release/4.0.2'
wisskid Jan 9, 2022
baad311
Fixed PHPUnit expected Exceptions. (#701)
wisskid Jan 10, 2022
19ae410
Merge pull request from GHSA-4h9c-v5vg-5m6m
wisskid Jan 10, 2022
ace1c8e
version bump
wisskid Jan 10, 2022
f707dad
Merge branch 'release/4.0.3'
wisskid Jan 10, 2022
059bea2
Support multiple operators in math equations (#708)
caugner Jan 17, 2022
995b7eb
version bump
wisskid Jan 17, 2022
cdf0f2b
Merge branch 'release/4.0.4'
wisskid Jan 17, 2022
8d3a7af
Cherry-picked from da76d927ed77fb6b3cb8345b83776712d0778e55
thirsch Jan 18, 2022
277648b
Cherry-picked from da76d927ed77fb6b3cb8345b83776712d0778e55
thirsch Jan 18, 2022
323aefa
Fix phpunit warning
atomiix Oct 20, 2021
cef8951
Add PHP 8.1 tests
atomiix Oct 20, 2021
0ef0dda
Merge pull request #713 from vemaeg/php81
wisskid Jan 21, 2022
612094d
Updated changelog
wisskid Jan 21, 2022
bbcd581
Update README.md
thirsch Jan 21, 2022
0f09880
Create getting-started.md
thirsch Jan 21, 2022
2d97169
Merge branch 'smarty-php:master' into php81-doc
thirsch Jan 21, 2022
6786623
Activating jit compiler for ubuntu-latest + php 8.1
thirsch Jan 21, 2022
02633ec
math equation return warning: math: illegal character for : {math equ…
Feb 4, 2022
47f95ad
Merge pull request #717 from vemaeg/php81-doc
wisskid Feb 6, 2022
265cf4f
version bump
wisskid Feb 6, 2022
9e0536d
Merge branch 'release/4.1.0'
wisskid Feb 6, 2022
f903489
Merge pull request #722 from kochichi/bugfix/721
wisskid Feb 6, 2022
0d2c38b
fix PHP 8.1 deprecation notices in demo/plugins/cacheresource.pdo.php
wisskid Feb 6, 2022
18d3e56
Merge branch 'master' into bugfix/706
wisskid Feb 6, 2022
1702542
Merge pull request #724 from smarty-php/bugfix/706
wisskid Feb 6, 2022
3cc5639
prevent float to int cast deprecation warning in truncate modifier
wisskid Feb 6, 2022
e5a6ff4
Merge pull request #725 from smarty-php/bugfix/699
wisskid Feb 6, 2022
50c4604
Added issue 721 to changelog
wisskid Feb 7, 2022
fe6d333
Ignore `.github` folder for distribution
pH-7 Feb 7, 2022
a2e1df1
PHP 8.1: fix deprecation in escape modifier
liborm85 Feb 8, 2022
8aeb5d6
Merge pull request #726 from pH-7/patch-1
wisskid Feb 13, 2022
962f266
Fix PHP 8.1 deprecated warning when calling rtrim
xorti Mar 10, 2022
db25472
Exclude docs from export and composer
ssigwart Apr 2, 2022
e68065b
Exclude demo from export and composer
ssigwart Apr 2, 2022
89dc506
Add changelog
wisskid Apr 26, 2022
bfa02f3
Merge branch 'patch-1'
wisskid Apr 26, 2022
8b96efa
Merge pull request #743 from xorti/fix-php81-rtrim-calls
wisskid Apr 26, 2022
52056ce
Changelog
wisskid Apr 26, 2022
a6711b3
Merge pull request #727 from liborm85/escape-modifier-fix
wisskid Apr 26, 2022
3f97b73
Changelog
wisskid Apr 26, 2022
05f1a7d
Replace '*/' in user supplied input in C-style comments with '* /'.
wisskid May 16, 2022
7eff7d6
Changelog
wisskid May 16, 2022
64ad644
Merge branch 'security/blockfunctioninjection'
wisskid May 17, 2022
78f0cf5
version bump
wisskid May 17, 2022
71036be
Merge branch 'release/4.1.1'
wisskid May 17, 2022
6295044
Add CVE to changelog
wisskid May 17, 2022
f8e1ba7
Replaced outdated references to SMARTY_RESOURCE_CHAR_SET in docs with…
wisskid Jun 15, 2022
44bac8d
add local testrunners for all supported PHP versions using docker. (#…
wisskid Jul 14, 2022
382d663
Fix PHP 8.1 htmlspecialchars deprecation (#766)
gkreitz Jul 14, 2022
560475a
Do not use obsolete smarty properties '_dir_perms', '_file_perms', 'p…
wisskid Jul 16, 2022
d6ac329
Merge branch 'master' of github.com:JonisoftGermany/smarty into Jonis…
wisskid Jul 16, 2022
cb95216
Changelog
wisskid Jul 16, 2022
27910bf
git push origin masterMerge branch 'JonisoftGermany-master'
wisskid Jul 16, 2022
20a8026
Merge branch 'fix-issue-549-v3' of github.com:AnrDaemon/smarty into A…
wisskid Jul 19, 2022
f4b26a3
Fixed second param of unescape modifier (#778)
wisskid Aug 1, 2022
ed45455
version bump
wisskid Aug 1, 2022
97aeb14
Merge branch 'release/4.2.0'
wisskid Aug 1, 2022
02968a8
Update SECURITY.md
wisskid Aug 16, 2022
1bc7c72
address PHP 8.1 'explode', 'number_format', and 'replace' deprecation…
mfettig Sep 9, 2022
f8f97b4
Fixed PHP8.1 deprecation errors in upper modifier #788
wisskid Sep 10, 2022
5479e33
Fixed use of `rand()` without a parameter in math function (#795)
wisskid Sep 12, 2022
6872e78
Utility script for running unit tests on all PHP versions locally
wisskid Sep 12, 2022
50d5890
Exclude unit test files from git export
wisskid Sep 12, 2022
7494818
prevent double CI workflows in PRs
wisskid Sep 12, 2022
d304d34
Fixed PHP8.1 deprecation errors in capitalize modifier
wisskid Sep 13, 2022
55ea25d
Applied appropriate javascript and html escaping in mailto plugin to …
wisskid Sep 14, 2022
813c83f
Fixed unselected year/month/day not working in html_select_date
wisskid Sep 14, 2022
c693d81
version bump
wisskid Sep 14, 2022
ffa2b81
Merge branch 'release/4.2.1'
wisskid Sep 14, 2022
e2e68b3
clean output buffer for Throwable instead of just Exception (#797)
wisskid Sep 14, 2022
d683641
Fix wrong indentation in libs/plugins/modifier.capitalize.php (#802)
MrPetovan Sep 18, 2022
db80246
fix compilation for caching templates (#801)
Storyxx Sep 18, 2022
32a11b3
Added changelog
wisskid Sep 18, 2022
bf7d6b8
Include docs en demo in the releases.
wisskid Sep 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 4 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

# exclude from git export
/tests export-ignore
/utilities/ export-ignore

/utilities export-ignore
/docker-compose.yml export-ignore
/.github export-ignore
/run_tests_for_all_php_versions.sh export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/error_reporting.ini export-ignore
/make-release.sh export-ignore
/phpunit.sh export-ignore
/phpunit.xml export-ignore
/TODO.md export-ignore
/travis.ini export-ignore
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
pull_request:
push:
branches:
- 'master'

name: CI

jobs:
tests:
name: Tests

runs-on: ${{ matrix.os }}

env:
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
PHP_INI_VALUES: assert.exception=1, zend.assertions=1

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest

php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"

compiler:
- default

include:
- os: ubuntu-latest
php-version: "8.0"
compiler: jit
- os: ubuntu-latest
php-version: "8.1"
compiler: jit

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Override PHP ini values for JIT compiler
if: matrix.compiler == 'jit'
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests with phpunit
run: ./phpunit.sh
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
lexer/*.php
lexer/*.php.bak
lexer/*.out
utilies/*.php

# Dev
phpunit*
.phpunit.result.cache
vendor/*
composer.lock
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

116 changes: 114 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,122 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed
- Travis unit tests now run for all php versions >= 5.3
- Include docs and demo in the releases [#799](https://github.com/smarty-php/smarty/issues/799)

### Fixed
- PHP5.3 compatability fixes
- Output buffer is now cleaned for internal PHP errors as well, not just for Exceptions [#514](https://github.com/smarty-php/smarty/issues/514)
- Fixed recursion and out of memory errors when caching in complicated template set-ups using inheritance and includes [#801](https://github.com/smarty-php/smarty/pull/801)

## [4.2.1] - 2022-09-14

### Security
- Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks [#454](https://github.com/smarty-php/smarty/issues/454)

### Fixed
- Fixed PHP8.1 deprecation errors in modifiers (upper, explode, number_format and replace) [#755](https://github.com/smarty-php/smarty/pull/755) and [#788](https://github.com/smarty-php/smarty/pull/788)
- Fixed PHP8.1 deprecation errors in capitalize modifier [#789](https://github.com/smarty-php/smarty/issues/789)
- Fixed use of `rand()` without a parameter in math function [#794](https://github.com/smarty-php/smarty/issues/794)
- Fixed unselected year/month/day not working in html_select_date [#395](https://github.com/smarty-php/smarty/issues/395)

## [4.2.0] - 2022-08-01

### Fixed
- Fixed problems with smarty_mb_str_replace [#549](https://github.com/smarty-php/smarty/issues/549)
- Fixed second parameter of unescape modifier not working [#777](https://github.com/smarty-php/smarty/issues/777)

### Changed
- Updated HTML of the debug template [#599](https://github.com/smarty-php/smarty/pull/599)

## [4.1.1] - 2022-05-17

### Security
- Prevent PHP injection through malicious block name or include file name. This addresses CVE-2022-29221

### Fixed
- Exclude docs and demo from export and composer [#751](https://github.com/smarty-php/smarty/pull/751)
- PHP 8.1 deprecation notices in demo/plugins/cacheresource.pdo.php [#706](https://github.com/smarty-php/smarty/issues/706)
- PHP 8.1 deprecation notices in truncate modifier [#699](https://github.com/smarty-php/smarty/issues/699)
- Math equation `max(x, y)` didn't work anymore [#721](https://github.com/smarty-php/smarty/issues/721)
- Fix PHP 8.1 deprecated warning when calling rtrim [#743](https://github.com/smarty-php/smarty/pull/743)
- PHP 8.1: fix deprecation in escape modifier [#727](https://github.com/smarty-php/smarty/pull/727)

## [4.1.0] - 2022-02-06

### Added
- PHP8.1 compatibility [#713](https://github.com/smarty-php/smarty/pull/713)

## [4.0.4] - 2022-01-18

### Fixed
- Fixed illegal characters bug in math function security check [#702](https://github.com/smarty-php/smarty/issues/702)

## [4.0.3] - 2022-01-10

### Security
- Prevent evasion of the `static_classes` security policy. This addresses CVE-2021-21408

## [4.0.2] - 2022-01-10

### Security
- Prevent arbitrary PHP code execution through maliciously crafted expression for the math function. This addresses CVE-2021-29454

## [4.0.1] - 2022-01-09

### Security
- Rewrote the mailto function to not use `eval` when encoding with javascript

## [4.0.0] - 2021-11-25

## [4.0.0-rc.0] - 2021-10-13

### Added
- You can now use `$smarty->muteUndefinedOrNullWarnings()` to activate convert warnings about undefined or null template vars to notices when running PHP8

### Changed
- Switch CI from Travis to Github CI
- Updated unit tests to avoid skipped and risky test warnings

### Removed
- Dropped support for PHP7.0 and below, so Smarty now requires PHP >=7.1
- 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

## [3.1.40] - 2021-10-13

### Changed
- modifier escape now triggers a E_USER_NOTICE when an unsupported escape type is used https://github.com/smarty-php/smarty/pull/649

### Security
- More advanced javascript escaping to handle https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements thanks to m-haritonov

## [3.1.39] - 2021-02-17

### Security
- Prevent access to `$smarty.template_object` in sandbox mode. This addresses CVE-2021-26119.
- Fixed code injection vulnerability by using illegal function names in `{function name='blah'}{/function}`. This addresses CVE-2021-26120.

## [3.1.38] - 2021-01-08

### Fixed
- Smarty::SMARTY_VERSION wasn't updated https://github.com/smarty-php/smarty/issues/628

## [3.1.37] - 2021-01-07

### Changed
- Changed error handlers and handling of undefined constants for php8-compatibility (set $errcontext argument optional) https://github.com/smarty-php/smarty/issues/605
- Changed expected error levels in unit tests for php8-compatibility
- Travis unit tests now run for all php versions >= 5.3, including php8
- Travis runs on Xenial where possible

### Fixed
- PHP5.3 compatibility fixes
- Brought lexer source functionally up-to-date with compiled version

## [3.1.36] - 2020-04-14

Expand Down
31 changes: 0 additions & 31 deletions COMPOSER_RELEASE_NOTES.txt

This file was deleted.

91 changes: 0 additions & 91 deletions INHERITANCE_RELEASE_NOTES.txt

This file was deleted.

Loading