You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refine consent hash: ConsentAttributes value object, DI, docs, and cleanup
Encapsulate stable consent hash normalisation in the ConsentAttributes
value object. The raw-array + boolean flag signature of
getStableAttributesHash scattered the "which strategy" decision across
every call boundary. ConsentAttributes with named constructors
(withValues / namesOnly) makes the strategy choice once at the call
site, removes the boolean from downstream signatures, and centralises
all normalisation logic with a single testable output (getCompareValue).
Also in this commit:
- Use Symfony DI for Consent factory instead of relying on the old Corto
service provider singleton (EngineBlock_ApplicationSingleton)
- Make empty-attribute stripping explicit: rename sortArrayRecursive to
sortRecursive (sort-only), make removeEmptyAttributes recursive so
nested empty sub-values are stripped without relying on the sort pass
- Add tests pinning the empty-attribute stripping policy:
* Attribute going from having values to empty array -> different hash
(triggers re-consent: SP was receiving data, now isn't)
* Stray empty string in value list -> stripped, same hash as without it
(no spurious re-consent)
* Zero values (0, 0.0, "0") -> preserved, not stripped
- Remove unused parameters and properties
- Add CHANGELOG entry for feature_stable_consent_hash_migration
- Annotate deprecated code for removal after next release
- Expand unit test coverage for consent hashing
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,12 @@ Changes:
27
27
* The `0000-00-00 00:00:00` is added for clarity/consistency, as this is probably the default behaviour of your database already.
28
28
* Removed unused index `consent.deleted_at`. Delete this from your production database if it's there.
29
29
30
+
* Stabilized consent checks
31
+
* In order to make the consent hashes more robust, a more consistent way of hashing the user attributes has been introduced
32
+
* This feature automatically migrates from the old hashes to the new hashes, cleaning up the old hash.
33
+
* However, if blue/green deployments are used or if you want to keep the option open to roll back the EB release, keep the `feature_stable_consent_hash_migration` set to false in order to preserve the old consent hashes.
34
+
* Once the new release is fully rolled out, set `feature_stable_consent_hash_migration` to true. This will clean up the old consent hashes upon login. In the next EB release, the old consent hash column will be deleted.
0 commit comments