Commit Graph

2409 Commits

Author SHA1 Message Date
Michal Kleiner
da06a2d0cf
Merge pull request #10577 from creative-commoners/pulls/4/textcollector-class-notation 2022-11-25 10:27:59 +13:00
Will Rossiter
1354edf054
fix misleading error message with test class 2022-11-25 09:13:08 +13:00
Chris Penny
31d5aef520 Bugfix: SSViewer check object exists before calling prop or method 2022-11-24 13:18:56 +13:00
Steve Boyd
20582936d8 Merge branch '4.12' into 4 2022-11-23 16:42:25 +13:00
Sabina Talipova
a52c7795c7 Merge branch '4' into 5 2022-11-22 11:41:53 +13:00
Guy Sartorelli
8e16b57646
Merge branch '4' into 5 2022-11-21 18:13:01 +13:00
Steve Boyd
cb76f312a4 Merge branch '4.11' into 4.12-release 2022-11-21 13:44:23 +13:00
Steve Boyd
dc98cad48a Merge branch '4.10' into 4.11 2022-11-21 13:43:59 +13:00
Steve Boyd
fe13856769 [CVE-2022-37429] Sanitise XSS 2022-11-21 13:06:40 +13:00
Guy Sartorelli
17f1c7ceed
Merge pull request #10585 from creative-commoners/pulls/4.11/cve-2022-37430
Sanitise mixed case javascript
2022-11-21 13:03:30 +13:00
Guy Sartorelli
e5b81109de
Merge pull request #10584 from creative-commoners/pulls/4.11/cve-2022-38462
Don't allow CRLF in header values
2022-11-21 13:02:25 +13:00
Steve Boyd
4308a93cc8 [CVE-2022-38148] Validate SortColumn exists 2022-11-21 13:01:32 +13:00
Guy Sartorelli
b17b29eea1
Merge pull request #10583 from creative-commoners/pulls/4.11/cve-2022-38724-embed-shortcode
Restrict embed shortcode attributes
2022-11-21 13:01:23 +13:00
Sabina Talipova
ad116c63e6
Merge pull request #10565 from creative-commoners/pulls/4/stop-depr
API Stop using deprecated API
2022-11-16 14:26:18 +13:00
Steve Boyd
137ebcebec API Stop using deprecated API 2022-11-15 18:20:54 +13:00
Daniel Hensby
c49abf0fcc
Merge remote-tracking branch 'upstream/4.11' into 4.12 2022-11-11 13:25:54 +00:00
Guy Sartorelli
521c8179b1
ENH Correctly parse SomeClass::class syntax in textcollection 2022-11-11 11:37:53 +13:00
Lee Bradley
78b661dcf6
Prevent infinite loop when getting table name for ComponentID
If the field isn't in the first 2 classes then would just continue to loop
Fix means it will continue going to parent classes

Can be seen in the UsedOnTable in `admin` module if you have injected a new `Image` class that extends the built in one
2022-11-10 14:00:29 +00:00
Guy Sartorelli
ed63beeeee
Merge branch '4.11' into 4 2022-11-09 10:53:09 +13:00
Loz Calver
7f8f5afc91 Ensure forms/fields overridden by onBeforeRender() can override templates 2022-11-02 11:57:57 +00:00
Loz Calver
e2cb683f14 FIX: Stop FormField onBeforeRenderHolder extension result being overridden 2022-11-02 10:06:23 +00:00
Loz Calver
c925fae180 NEW: Add onBeforeRender extension hook to Form 2022-11-02 10:05:02 +00:00
Steve Boyd
9091d64652 API Deprecate Member::create_new_password() 2022-11-02 10:08:27 +13:00
Steve Boyd
b1dc861aac NEW Record deprecated config 2022-10-31 19:00:59 +13:00
Steve Boyd
a3c1cb0ddf
ENH Set PasswordEncryption on default admin 2022-10-27 13:57:27 +13:00
Guy Sartorelli
168ca00555
[CVE-2022-38724] Restrict embed shortcode attributes 2022-10-26 09:31:12 +13:00
Michal Kleiner
e11216d8ea
Merge pull request #10558 from creative-commoners/pulls/5/broken-builds 2022-10-21 18:46:41 +13:00
Steve Boyd
df1d4a4b9a ENH Move email to data conversion to protected method 2022-10-21 15:54:06 +13:00
Steve Boyd
6e9d3ab632 Merge branch '4' into 5 2022-10-21 12:00:39 +13:00
Steve Boyd
59b980edd7 Merge branch '4.11' into 4 2022-10-21 11:46:39 +13:00
Steve Boyd
897f9906f9 FIX Handle calling Deprecation::notice() before manifests are available 2022-10-21 10:08:31 +13:00
Sabina Talipova
3601b7ab8b
DEP Upgrade installer dependencies (#10534) 2022-10-21 09:59:34 +13:00
Steve Boyd
bd2eb15c72 FIX Ensure Deprecation works with 1.x branches 2022-10-20 13:14:58 +13:00
Steve Boyd
e3a6cad8a8 FIX Allow passing objects to InjectionCreator::create()
Co-authored-by: Nate Devereux <nate@daveclark.co.nz>
2022-10-19 18:04:48 +13:00
Guy Sartorelli
919cfcf435
Merge pull request #10494 from creative-commoners/pulls/5/symfony-mailer
NEW Migrate from swiftmailer/swiftmailer to symfony/mailer
2022-10-19 15:52:31 +13:00
Steve Boyd
2e85674ccc NEW Migrate from swiftmailer/swiftmailer to symfony/mailer 2022-10-19 15:16:14 +13:00
Steve Boyd
a57c7315a2 API Strongly-type action method signatures 2022-10-17 17:58:20 +13:00
Phillip King
c4b3d5304d Update tinymce links in comments 2022-10-14 16:11:58 +13:00
Steve Boyd
9c453abf89 API Update deprecations 2022-10-13 14:49:15 +13:00
Steve Boyd
33b6a00f49 ENH Update deprecation messages 2022-10-13 14:48:40 +13:00
Steve Boyd
e6aa183eb4 API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
2991901660 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
7b87926428 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
9f541b9a04 MNT Remove deprecation from private method 2022-10-13 14:05:49 +13:00
Steve Boyd
cc49036616 ENH Standardise deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
0852f504fb API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
1ee0aff1d1 FIX Prevent infinite loops in Deprecation::notice() 2022-10-13 13:37:29 +13:00
Steve Boyd
83a09daa3a Merge branch '4' into 5 2022-10-07 14:45:05 +13:00
Steve Boyd
906cd0e76d
API Deprecate render() (#10527) 2022-10-07 14:44:02 +13:00
Guy Sartorelli
8419984b36
Merge pull request #10517 from creative-commoners/pulls/4/deprecate-swiftmailer
API Deprecate swiftmailer
2022-10-07 09:37:11 +13:00
Steve Boyd
96a931d24f API Deprecate swiftmailer 2022-10-06 09:52:06 +13:00
Sabina Talipova
721b3cb597
Merge pull request #10508 from creative-commoners/pulls/5/tinymce6
FIX Update config to support tinymce6
Nice job!
2022-09-30 11:05:48 +13:00
Guy Sartorelli
ef8a02dfdc
FIX Update config to support tinymce6 2022-09-30 10:40:52 +13:00
Christian Bünte
e24fb3f86c
Fix i18nTextCollector produces corrupt output / namespaces when running under PHP8.0 (#10228)
* FIX i18nTextCollector produces corrupt output / namespaces when running under PHP8.0
2022-09-29 13:40:40 +13:00
Guy Sartorelli
5e16b29699
Merge branch '4' into 5 2022-09-29 09:43:31 +13:00
Guy Sartorelli
421864d111
Merge branch '4.11' into 4 2022-09-29 09:41:06 +13:00
Thomas Portelange
54892fa267
request may not have a session
see https://github.com/silverstripe/silverstripe-framework/pull/10512
2022-09-28 10:44:13 +02:00
Guy Sartorelli
4a598ded51
FIX Allow removing named extensions in yaml config 2022-09-27 13:15:28 +13:00
Bram de Leeuw
f78c3ee5bb
Member updateName extension hook
Allow updating the Member name from an extension
2022-09-26 16:57:39 +02:00
Guy Sartorelli
433926fc11
API Remove deprecated tinymce generator class 2022-09-19 16:21:09 +12:00
Steve Boyd
fc78763d20
Merge pull request #10497 from creative-commoners/pulls/5/rescue-master-template-enhancements
Rescue master branch PRs: Template enhancements
2022-09-15 16:55:18 +12:00
Guy Sartorelli
e140c3786c
FIX Ensure consistent behaviour with repeat iterations 2022-09-15 16:22:48 +12:00
Guy Sartorelli
62ee63706f
FIX PHP 8.1 compatability for iterators.
Setting a proper return type for these will be done in a separate PR
2022-09-15 13:29:41 +12:00
Guy Sartorelli
a76fa32a39
API Remove unnecessary getGenerator() method.
`getIterator()` now returns a generator by default.
2022-09-15 13:29:29 +12:00
Guy Sartorelli
bf331072df
FIX Don't try to call count() on an iterator 2022-09-15 13:29:29 +12:00
Sam Minnee
81beddc161
Add deprecated method to make CMS tests work 2022-09-15 13:29:29 +12:00
Sam Minnee
9eb9e13071
FIX: Re-set finalisedQuery to allow recreation of iterator. 2022-09-15 13:29:29 +12:00
Sam Minnee
9c7ecb1f79
Further work on Loz’ solution 2022-09-15 13:29:29 +12:00
Loz Calver
850482138b
Proposed solution for caching template generator counts 2022-09-15 13:29:29 +12:00
Loz Calver
8e0e797b40
Fix code style 2022-09-15 13:29:27 +12:00
Sam Minnee
6ef5785fc5
FIX: pre-cache loop content within SSViewer.
SSViewer iterates on Iterators that it receives twice: first to get the
total number of items, then to actually render each item.

This necessitates a rewind. In order to make more use of generators,
which are not rewindable, I’d like to remove the need for a rewind.

I’ve done this by caching the content of the iterator as an array
within SSViewer_Scope.

Although this means a bit of memory usage, there are no cases in which
code will get to this point without iterating on all items, which would
use the memory anyway. It would only create onerous impacts in cases
where you are iterating on very long iterators, which would mean you’re
rendering a very large page anyway, and probably have other performance
issues.
2022-09-15 13:29:00 +12:00
Loz Calver
1b8f601023
NEW: Make DataList::getIterator a generator 2022-09-15 13:29:00 +12:00
Sam Minnee
77c7552c3f
NEW: ORM’ Query is a generator-based IteratorAggregate
API: Query no longer has iterator methods current(), first(), rewind(), next()

Using generators reduces the amount of boilerplate needed for this
code.

Turning it into an IteratorAggregate means that the iterator can be
re-created for each subsequent foreach call. This means that the
rewind() and seek() functionality can be discarded.
2022-09-15 13:28:56 +12:00
Sam Minnee
d8735633a7
FIX: Don’t call PaginatedList::getIterator() directly.
It’s best for foreach() to call this for us.
2022-09-15 13:28:20 +12:00
Sam Minnee
1efe2b46ff
FIX: Fix PaginatedList::toArray()
It wasn’t respecting pagination.
2022-09-15 13:28:20 +12:00
Sam Minnee
6c136c9cf2
NEW: Iterate ArrayList via a generator
Using a generator here means that we don’t need to prepare a duplicate
array in-memory before iterating.
2022-09-15 13:28:20 +12:00
Sam Minnee
2ead3746d6
Replace Map_Iterator with a generator.
Generators (PHP 5.5+) make this kind of code structure much easier to
build.
2022-09-15 13:28:20 +12:00
Guy Sartorelli
03b929dd33
API Remove support for PDO (#10499) 2022-09-15 13:13:48 +12:00
Steve Boyd
5111b56ac9 ENH Add PHP 8.1 safe null-coalescing operators to peg file 2022-09-15 12:59:05 +12:00
Steve Boyd
a2028a2817 FIX Pass PSR6 caches to ChainAdapter 2022-09-13 16:44:07 +12:00
Guy Sartorelli
a605093656
Merge branch '4' into 5 2022-09-09 16:48:20 +12:00
Guy Sartorelli
c4eadcd074
Merge branch '4.11' into 4 2022-09-09 16:47:49 +12:00
Guy Sartorelli
5b2820e8ac
MNT Fix unit tests 2022-09-09 13:38:55 +12:00
Loz Calver
47337782a2
API: <% loop %> and <% with %> only ever create one new scope level 2022-09-09 11:23:38 +12:00
Loz Calver
3a6c48cddb
FIX: template parser erroring on strings partially matching true/false/null 2022-09-09 11:16:58 +12:00
Loz Calver
d6e8229352
FIX: Fix type preservation in <% include %> arguments 2022-09-09 11:16:55 +12:00
Loz Calver
4339e4d02c
NEW: Add support for native nulls as template lookup arguments 2022-09-09 11:15:09 +12:00
Loz Calver
4cda967eae
API: Preserve variable types in template lookup args 2022-09-09 11:11:30 +12:00
Steve Boyd
a87a657367 API Update translation to use symfony 6 2022-09-08 11:52:34 +12:00
Steve Boyd
c9bc01473c API Update caching to use symfony 6 2022-09-07 16:08:54 +12:00
Guy Sartorelli
d3c28579b7
[CVE-2022-38462] Don't allow CRLF in header values 2022-09-07 11:22:07 +12:00
Guy Sartorelli
06b13e0fa6
Revert "Merge pull request #10450 from creative-commoners/pulls/5/rescue-master-generators" (#10483)
This reverts commit 9edf3a5ca6, reversing
changes made to 934fafd29d.
2022-09-02 10:58:37 +12:00
Guy Sartorelli
1bf86cf39f
API Revert shorten auto-generated table names (#10482)
* Revert "BUG Fix table name test"

This reverts commit b36a01a8fd.

* Revert "ENH shorten auto-generated table names"

This reverts commit 156f63bce3.
2022-09-02 10:55:45 +12:00
Steve Boyd
37ff4ee46a
Merge pull request #10454 from creative-commoners/pulls/5/rescue-master-table-name
API rescue master-branch PR: Shorten auto-generated table names #7621
2022-09-01 09:12:11 +12:00
Guy Sartorelli
89a0f59ef1
FIX Remove accidental deprecation warnings.
These were erroneously added via a merge-up from 4 to 5.
2022-08-31 13:50:33 +12:00
Guy Sartorelli
f0a20ed400
MNT Fix merge-up error. 2022-08-31 13:38:18 +12:00
Guy Sartorelli
715415d5c8
Merge branch '4' into 5 2022-08-31 13:37:25 +12:00
Steve Boyd
250a75b233
Merge pull request #10457 from creative-commoners/pulls/5/rescue-master-extensions-expose-public
API Rescue Master Branch PR: Only expose public extension methods
2022-08-29 19:09:00 +12:00
Steve Boyd
9edf3a5ca6
Merge pull request #10450 from creative-commoners/pulls/5/rescue-master-generators
API rescue master-branch PR: Use Generators for ORM
2022-08-29 19:03:47 +12:00
Guy Sartorelli
6d885ab894
FIX Normalise casing before casting fields 2022-08-25 17:36:06 +12:00