Commit Graph

1093 Commits

Author SHA1 Message Date
Robbie Averill 735c87b709
Merge pull request #8327 from dhensby/pulls/4/application-json
FIX text/json is not a valid mimetype
2018-08-19 13:42:27 +12:00
maks 160d595e22
fix trailing whitespace 2018-08-17 18:16:17 +02:00
maks 16217f3655
fix accidentaly deleted comma 2018-08-17 15:13:13 +02:00
maks aa1e576a3f
convert to php 5.4+ array syntax 2018-08-17 15:03:46 +02:00
Daniel Hensby d9154bffbf
FIX text/json is not a valid mimetype 2018-08-15 12:10:39 +01:00
Ingo Schommer 2d6964c243
Merge pull request #8261 from open-sausages/pulls/4/secure-remember-me-cookie
NEW Option for secure "remember me" cookie
2018-07-31 09:19:15 +12:00
Daniel Hensby 4d83330981
Merge branch '4.2' into 4 2018-07-30 17:11:42 +01:00
Daniel Hensby 17dbb86257
Merge pull request #8293 from open-sausages/pulls/4.2/restore-default-delete-action-of-record-editor
FIX Restore default delete action on GridFieldConfig_RecordEditor
2018-07-30 17:00:09 +01:00
Ingo Schommer 114b0a5ea7
NEW Option for secure "remember me" cookie
Fixes #8234
2018-07-30 16:41:49 +01:00
Daniel Hensby d0598c02c5
Merge branch '4.2' into 4 2018-07-30 11:07:15 +01:00
Daniel Hensby ec5640cbd9
Merge tag '4.2.0' into 4.2
Release 4.2.0
2018-07-30 11:04:57 +01:00
Maxime Rainville 85b4b48fb5 FIX Restore default delete action on GridFieldConfig_RecordEditor 2018-07-27 17:19:09 +12:00
Mark Muller e154aa170c
Make removeDuplicates() chainable
Added the return to allow removeDuplicates to be chained.
2018-07-24 13:50:37 +01:00
Daniel Hensby ae00147de1
Merge pull request #8280 from open-sausages/pulls/4/simpler-vary-header
FIX: Remove X-Requested-With from default Vary header
2018-07-24 01:45:07 +01:00
Ingo Schommer d12c2fe631
Properly deprecate HTTP.cache_control 2018-07-23 19:09:11 +01:00
Ingo Schommer 0f5420b6a5
Removed unused classes 2018-07-23 19:09:11 +01:00
Ingo Schommer d426ecbb89
Add $maxAge arg for caching API
See https://github.com/silverstripe/silverstripe-framework/issues/8272
2018-07-23 19:09:10 +01:00
Daniel Hensby cc0320b2a7
Merge branch '4.2' into 4 2018-07-23 17:42:43 +01:00
Sam Minnee bde3121a33
FIX: Remove X-Requested-With from default Vary header
3.x forward port of https://github.com/silverstripe/silverstripe-framework/pull/8242
2018-07-23 14:18:05 +01:00
Daniel Hensby ccbbcd45a2
FIX Fixed bug in config merging priorities so that config values set by extensions are now least important instead of most important 2018-07-23 14:15:24 +01:00
Daniel Hensby 6e1c7c2781
FIX remove personal information from password reset confirmation screen 2018-07-23 14:13:52 +01:00
Maxime Rainville c77042aa8b
Fix linting. 2018-07-23 14:12:44 +01:00
Maxime Rainville 7fda52b2cd
Add a MERGE_AS_SUBMITTED_VALUE flag for Form::loadDataFrom 2018-07-23 14:12:43 +01:00
Maxime Rainville 3fa2c056d7
FIX Don't reload form session data using FormField::setSubmittedValue (#8056) 2018-07-23 14:12:43 +01:00
Ingo Schommer 74b655d3fc
Fix tests on unset session data
Thanks Robbie!
2018-07-23 14:09:42 +01:00
Ingo Schommer 76ac8465de
BUG Lazy session state (fixes #8267)
Fixes regression from 3.x, where sessions where lazy started as required:
Either because an existing session identifier was sent through with the request,
or because new session data needed to be persisted as part of the request execution.

Without this lazy starting, *every* request will get a session,
which makes all those responses uncacheable by HTTP layers.

Note that 4.x also changed the $data vs. $changedData payloads:
In 3.x, they both contained key/value pairs.
In 4.x, $data contains key/value, while $changedData contains key/boolean to declare isChanged.
While this reduces duplication in the class, it also surfaced a bug which was latent in 3.x:
When an existing session is lazily resumed via start(), $data is set back to an empty array.
In 3.x, any changed data before this point was *also* retained in $changedData,
ensuring it gets merged into existing $_SESSION data.
In 4.x, this clears out data - hence the need for a more complex merge logic.

Since isset($this->data) is no longer an accurate indicator of a started session,
we introduce a separate $this->started flag.

Note that I've chosen not to make lazy an opt-in (e.g. via start($request, $lazy=false)).
We already have a distinction between lazy starting via init(), and force starting via start().
2018-07-23 14:09:42 +01:00
Daniel Hensby e37b3b95f4
FIX updateValidatePassword calls need to be masked from backtraces 2018-07-23 14:08:26 +01:00
Daniel Hensby a3687147fe
State default should be state enabled (no-cache is an enabled state) 2018-07-23 14:07:10 +01:00
Daniel Hensby 9f1471332d
Make augmentState method more efficient 2018-07-23 14:07:10 +01:00
Daniel Hensby cebed776ab
FIX If theres a max-age set remove no-cache and no-store 2018-07-23 14:07:09 +01:00
Daniel Hensby 2b1c55bc4e
FIX Allow setNoCache(false) to remove no-cache directive 2018-07-23 14:07:09 +01:00
Daniel Hensby 842b39e988
FIX Add must-revalidate to default state so its common on all our core states 2018-07-23 14:07:09 +01:00
Daniel Hensby 997730aa7f
FIX Allow cache control changes to affect default state 2018-07-23 14:07:08 +01:00
Daniel Hensby c52be7fe09
Consolidate disabling cache logic 2018-07-23 14:05:12 +01:00
Daniel Hensby f7f567a12e
Make config private (notation isnt working) 2018-07-23 14:05:12 +01:00
Daniel Hensby b78a89a76c
FIX Default cache state should be `no-cache` 2018-07-23 14:05:12 +01:00
Daniel Hensby 793aafae91
FIX Transaction depth should error if not implemented by child classes 2018-07-23 14:03:20 +01:00
Robbie Averill 1048520fbe
Restore check for zero or negative transaction nesting 2018-07-23 14:01:22 +01:00
Daniel Hensby cbdf547c1b
Address feedback 2018-07-23 14:01:22 +01:00
Damian Mooyman 8ea3bb36a0
Maybe fix it? 2018-07-23 14:01:21 +01:00
Damian Mooyman 225e61dc67
BUG FIx manual resetDBSchema() calls breaking the database 2018-07-23 14:01:21 +01:00
Damian Mooyman 11e0a3de43
BUG Ensure that build includes extra classes 2018-07-23 14:01:21 +01:00
Damian Mooyman 95bcac796a
ENHANCEMENT Ensure test DB is flushed on either DDL or transaction-disabled tests
Fixes #8182
2018-07-23 14:01:20 +01:00
Daniel Hensby b984959170
Merge branch '4.1' into 4.2 2018-07-23 13:30:49 +01:00
Ingo Schommer e415bcb44a Fix tests on unset session data
Thanks Robbie!
2018-07-19 13:32:08 +12:00
Ingo Schommer 93b0884e19 BUG Lazy session state (fixes #8267)
Fixes regression from 3.x, where sessions where lazy started as required:
Either because an existing session identifier was sent through with the request,
or because new session data needed to be persisted as part of the request execution.

Without this lazy starting, *every* request will get a session,
which makes all those responses uncacheable by HTTP layers.

Note that 4.x also changed the $data vs. $changedData payloads:
In 3.x, they both contained key/value pairs.
In 4.x, $data contains key/value, while $changedData contains key/boolean to declare isChanged.
While this reduces duplication in the class, it also surfaced a bug which was latent in 3.x:
When an existing session is lazily resumed via start(), $data is set back to an empty array.
In 3.x, any changed data before this point was *also* retained in $changedData,
ensuring it gets merged into existing $_SESSION data.
In 4.x, this clears out data - hence the need for a more complex merge logic.

Since isset($this->data) is no longer an accurate indicator of a started session,
we introduce a separate $this->started flag.

Note that I've chosen not to make lazy an opt-in (e.g. via start($request, $lazy=false)).
We already have a distinction between lazy starting via init(), and force starting via start().
2018-07-19 13:32:04 +12:00
Daniel Hensby 921b98112e
Merge pull request #8262 from open-sausages/pulls/4/falsifying-tab-evidence
MINOR removeField(s)FromTab no longer creates a tab if it doesn't exist
2018-07-16 17:26:41 +01:00
Gerald Baumeister df5395b101 Added check for php-intl requirement 2018-07-16 18:08:25 +02:00
Loz Calver b317bf163c
Merge pull request #8213 from creative-commoners/pulls/4.2/falsy-forms
FIX FormField::Link works when no form is currently set
2018-07-16 13:53:58 +01:00
Robbie Averill b93e94c0c3
FIX FormField::Link now throws a LogicException if no form is set yet 2018-07-16 13:02:58 +01:00