When viewing forum page with nonexistent TID, or TID from another vocabulary, forum_page continuing to output forum listing page, instead of 404 page. This happening due to missing validation of $tid in forum_page. This affect both drupal 5.x and drupal 6.x versions.
My solution is to add this code to forum_page function, right after $tid = (int)$tid;

  $term = taxonomy_get_term($tid);
  $forum_nav_vocabulary = variable_get('forum_nav_vocabulary', '');
  // Check if this is a valid term.
  if (!$term or $term->vid != $forum_nav_vocabulary) {
    return drupal_not_found();
  }  

This can get very messy, aseptically, if you are using pathauto module to generate aliases like forum/2009/10/13/page-title-or-nid.

Comments

michelle’s picture

Status: Active » Closed (duplicate)