### Eclipse Workspace Patch 1.0
#P caivn
Index: sites/all/modules/vote_up_down/vote_up_down.module
===================================================================
--- sites/all/modules/vote_up_down/vote_up_down.module	(revision 156)
+++ sites/all/modules/vote_up_down/vote_up_down.module	(working copy)
@@ -514,7 +514,8 @@
  * Function for the main voting handler with Ajax support.
  */
 function vote_up_down_vote($type, $cid, $value, $tag = NULL, $ajax = FALSE, $alt = FALSE) {
-  if (is_numeric($cid) && is_numeric($value) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], "vote_up_down/$type/$cid/$value")) {
+  global $user;
+  if (is_numeric($cid) && is_numeric($value) && ($user->uid == 0 || isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], "vote_up_down/$type/$cid/$value"))) {
     $vote = array();
     // Sanity-check the incoming values.
     if ($value > 0) {
@@ -534,7 +535,6 @@
 
     // Userpoints integration.
     if (module_exists('userpoints')) {
-      global $user;
       if ($type == 'node') {
         $node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.uid FROM {node} n WHERE n.nid = %d'), $cid));
       }
