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.

Comments

damien tournoud’s picture

Status: Active » Needs review
StatusFileSize
new2.3 KB
damien tournoud’s picture

And a second version, thanks to chx.

chx’s picture

Status: Needs review » Reviewed & tested by the community

This is good and although it does not have tests , there are many tests coming that will use this.

dries’s picture

Status: Reviewed & tested by the community » Fixed

This looks good. Committed. Looking forward to the follow-up patches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xano’s picture

Assigned: Unassigned » xano
Status: Closed (fixed) » Needs review
StatusFileSize
new595 bytes
new615 bytes

Tokens 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().

xano’s picture

Assigned: xano » Unassigned
Status: Needs review » Closed (fixed)

Ah, of course. This is a 7.x issue. I moved the patches to #1555862: DrupalWebTestCase::drupalGetToken() does not add hash salt.