I won't have time to check this, sorry, so I'm only reporting here a _possible_ bug.

I see the following code in 'misc/drupal.js':

if (Drupal.jsEnabled) {
  ...
  // 'js enabled' cookie
  document.cookie = 'has_js=1';
  ...
}

And I think this should be changed to:

  document.cookie = 'has_js=1; path=/';

Or else a cookie created at 'node/1234' won't be seen at 'taxonomy/term/5'. And we will have a "cookie polution": lot's of cookies, especially if path_auto is used to creating 'folders'.

A related issue:

I see the following in 'comment.module':

setcookie('comment_info_'. $field, $form_state['values'][$field], time() + 31536000);

And I wonder if the 'path' parameter should be used here.

CommentFileSizeAuthor
#3 comment_cookie_path-177927-3.patch1.26 KBchx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mooffie’s picture

Title: A possible coockie polution » A possible cookie polution

:-)

chx’s picture

See http://drupal.org/node/177906 for the JS issue.

chx’s picture

Component: javascript » comment.module
Status: Active » Needs review
FileSize
1.26 KB

True.

mooffie’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the patch. It indeed solves a nasty bug with these identity cookies.

(To easily see the bug I configured the comment form to show "below the post" (not "on a separate page" because then all the comment forms would have a somewhat common base path).

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)