It would help a few cleaning up (especially #144538: User logout is vulnerable to CSRF and #370454: Simplify page caching) to have the session_id, session_name available. This will allow us to simplify session tests, and to compute security tokens on the testing side.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | drupalGetToken_hash_salt_00.patch | 615 bytes | xano |
| #6 | drupalGetToken_hash_salt_00-d7.patch | 595 bytes | xano |
| #2 | 477038-drupalwebtestcase-session-support.patch | 3.21 KB | damien tournoud |
| #1 | 477038-drupalwebtestcase-session-support.patch | 2.3 KB | damien tournoud |
Comments
Comment #1
damien tournoud commentedComment #2
damien tournoud commentedAnd a second version, thanks to chx.
Comment #3
chx commentedThis is good and although it does not have tests , there are many tests coming that will use this.
Comment #4
dries commentedThis looks good. Committed. Looking forward to the follow-up patches.
Comment #6
xanoTokens are unusable, because DrupalWebTestCase::drupalGetToken() does not use a hash salt, while drupal_get_token() does.
The patches make drupalGetToken() up to date with drupal_get_token().
Comment #7
xanoAh, of course. This is a 7.x issue. I moved the patches to #1555862: DrupalWebTestCase::drupalGetToken() does not add hash salt.