Problem/Motivation
Drupal caches requests served by the module. We should disable caching when the request has X-AUTH-TOKEN, otherwise, requests without a token might still return sensitive data because of the cache.
Steps to reproduce
- Make a request with a token generated by the module
- Remove the X-AUTH-TOKEN header and then do the request once again
- Observe that Drupal return data that shouldn't be returned without a token.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | disable-pagecache-3179031-2.patch | 1.42 KB | alt.dev |
Issue fork rest_api_access_token-3179031
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3179031-disable-pagecache-for
changes, plain diff MR !2
Comments
Comment #2
alt.dev commentedHere is a patch that resolves this issue.
The patch was created in contributing with @bohart so it would be great if he will get a credit as well.
Comment #6
marcinkazmierski commentedComment #7
marcinkazmierski commented