- Issue created by @omarlopesino
- Merge request !12Issue #3450094: Cache contexts used are not compatible with dynamic cache context → (Open) created by omarlopesino
- Status changed to Needs review
11 months ago 11:53am 27 May 2024 - 🇪🇸Spain omarlopesino
I've just created a MR using URL cache contexts. I've tested manually and node Authlink works as usual:
- The Authlink URL only works on the proper URL.
- When the Authlink is removed, if I try to enter the Authlink URL on a browser without session, I get an access denied.Please review, thanks!
- 🇪🇸Spain omarlopesino
I would like to propose adding tests to the module. This issue affects the node access and having tests may prevent regressions or future security issues.
- Assigned to tunic
- 🇪🇸Spain tunic Madrid
I'm wondering if the module should enable caching.
I mean, the module decorates the EntityAccessCheck but that class does not add any caching information. And given that NodeAuthlink always adds caching information on any AccessResult it means any URL that calls the entity check access uses the cache info added by the module.
I think this may be too drastic. So I think the caching info should only be added for URLs handled by the module or even remove it completely. Anybody that has the URL should be able to access, so no need to cache by user.
Ill try add some automated tests to be sure which approach is the good one.
- 🇪🇸Spain omarlopesino
I've updated the patch to not use access contexts. In my tests, the module behaves as usual. Pending to review with the tests that will be added at https://www.drupal.org/project/node_authlink/issues/3450411 📌 Add automated tests Active