Hi Killes,

Looking at the code I noticed the addition of at least two new sessions (which I wish weren't necessary but...)

So I checked the entire module to make sure... All session names, just like any other name specific to the spam module must start with "spam_<name>".

From the complete list of session variables below, I see:

'content' -- needs to be changed to 'spam_content'
'type' -- needs to be changed to 'spam_type'
'bypass_spam_filter' -- probably okay, should be 'spam_bypass_filter'
'spam_overview_filter' -- correct
'spam_form' -- probably correct

Thank you.
Alexis Wilke

spam/spam.module:        $_SESSION['content'] = serialize((array)$content);
spam/spam.module:        $_SESSION['type'] = $type;
spam/spam.module:        $_SESSION['content'] = serialize((array)$content);
spam/spam.module:        $_SESSION['type'] = $type;
spam/spam.module:    $_SESSION['content'] = serialize((array)$content);
spam/spam.module:    $_SESSION['type'] = $type;
spam/spam.module:    $_SESSION['content'] = serialize((array)$content);
spam/spam.module:    $_SESSION['type'] = $type;
spam/spam.module:  return ($hash1 == md5($_SESSION['content']) && $hash2 = _spam_sign($_SESSION['content']));
spam/spam.module:      $_SESSION['bypass_spam_filter'] = TRUE;
spam/spam.module:  $session = &$_SESSION['spam_overview_filter'];
spam/spam.module:            $_SESSION['spam_overview_filter'][] = array($filter, $form_state['values'][$filter]);
spam/spam.module:          $_SESSION['spam_overview_filter'][] = array($filter, $form_state['values'][$filter]);
spam/spam.module:      array_pop($_SESSION['spam_overview_filter']);
spam/spam.module:      $_SESSION['spam_overview_filter'] = array();
spam/spam.module:  foreach ($_SESSION['spam_overview_filter'] as $index => $filter) {
spam/spam.module:    $message = strtr(variable_get('spam_filtered_message', t('<p>Your posting on @site from %IP has been automatically flagged by our spam filters as being inappropriate for this website.</p>At @site we work very hard to keep our web pages free of spam.  Unfortunately, sometimes we accidentally block legitimate content.  If you are attempting to post legitimate content to this website, you can help us to improve our spam filters and ensure that your post appears on our website by clicking this link:</p><blockquote>%LINK</blockquote>', array('@site' => variable_get('site_name', 'Drupal'), ))), array('%IP' => ip_address(), '%LINK' => _spam_error_link($_SESSION['content'])));
spam/spam.module:  if ($_SESSION['content']) {
spam/spam.module:    $content = unserialize($_SESSION['content']);
spam/spam.module:      $hash = md5($_SESSION['content']);
spam/spam.module:  $content = unserialize($_SESSION['content']);
spam/spam.module:  $type = $_SESSION['type'];
spam/spam.module:  $form = $_SESSION['spam_form'];
spam/spam.module:  $content = unserialize($_SESSION['content']);
spam/spam.module:  $type = $_SESSION['type'];
spam/spam.module:  $hash = md5($_SESSION['content']);
spam/spam.module:  if (is_array($_SESSION['spam_form'])) {
spam/spam.module:    $spam_form = serialize($_SESSION['spam_form']);
spam/spam.module:    $spam_form = $_SESSION['spam_form'];
spam/spam.module:    db_query("INSERT INTO {spam_filters_errors} (uid, language, content_type, content_id, content_hash, content, form, hostname, feedback, timestamp) VALUES(%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", $user->uid, $language->language, $type, $id, $hash, $_SESSION['content'], $spam_form, ip_address() , $feedback, time());
spam/spam.module:  $_SESSION['content'] = $_SESSION['type'] = $_SESSION['spam_form'] = '';
spam/spam.module:    $_SESSION['bypass_spam_filter'] = TRUE;
spam/spam.module:  if ((isset($_SESSION['bypass_spam_filter']) && $_SESSION['bypass_spam_filter'])) {
spam/spam.module:    unset($_SESSION['bypass_spam_filter']);
spam/content/spam_content_comment.inc:    $_SESSION['spam_form'] = $form;
spam/content/spam_content_comment.inc:  if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_comment.inc:    unset($_SESSION['spam_form']);
spam/content/spam_content_contact.inc:  $_SESSION['spam_form'] = $form_state;
spam/content/spam_content_contact.inc:  if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_contact.inc:    unset($_SESSION['spam_form']);
spam/content/spam_content_node.inc:    $_SESSION['spam_form'] = $form;
spam/content/spam_content_node.inc:  if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_node.inc:    unset($_SESSION['spam_form']);
spam/content/spam_content_privatemsg.inc:      spam_content_insert($_SESSION['content'], 'privatemsg');
spam/content/spam_content_privatemsg.inc:  $_SESSION['spam_form'] = $form_state;
spam/content/spam_content_privatemsg.inc:  if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_privatemsg.inc:    unset($_SESSION['spam_form']);
spam/content/spam_content_user.inc:          $_SESSION['spam_form'] = $arg2;
spam/content/spam_content_user.inc:        if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_user.inc:          unset($_SESSION['spam_form']);
spam/content/spam_content_user.inc:    $_SESSION['spam_form'] = $form;
spam/content/spam_content_user.inc:  if (isset($_SESSION['spam_form'])) {
spam/content/spam_content_user.inc:    unset($_SESSION['spam_form']);

Comments

killes@www.drop.org’s picture

Status: Active » Fixed

I've changed all the keys similar to what you poposed.

AlexisWilke’s picture

Thank you.
Alexis

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