This applies to both Drupal 6 and Drupal 7 versions of Session API although the syntax is different since db_placeholders() was deprecated in Drupal 7.

This query call in session_api_cron() should use proper placeholder logic

See:
(Drupal 6) http://api.drupal.org/api/drupal/includes--database.inc/function/db_plac...
(Drupal 7) http://drupal.org/node/310072

db_query('DELETE FROM {session_api} WHERE sid IN (' . implode(',', $outdated_sids) . ')');

Comments

jhedstrom’s picture

Status: Needs review » Fixed

Thanks for the issue and the patches, committed to 6 and 7.

Status: Fixed » Closed (fixed)

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

jaydub’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new530 bytes

As noted in #1058960: Use an expiration logic when clearing sessions on cron in comment #22 I left out the $outdated_sids array from the patch for d6. Re-rolled with the right code now.

a.ross’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)