Changeset 426
- Timestamp:
- 01/18/06 05:37:10 (3 years ago)
- Files:
-
- trunk/src/lib/functions.php (modified) (2 diffs)
- trunk/src/lyceum/wp-admin/upgrade-schema.php (modified) (1 diff)
- trunk/src/lyceum/wp-comments-post.php (modified) (1 diff)
- trunk/src/lyceum/wp-content/themes/default/comments.php (modified) (1 diff)
- trunk/src/lyceum/wp-settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/lib/functions.php
r425 r426 87 87 $token = md5(uniqid(rand(), TRUE)); 88 88 $_SESSION['formtokens']["$name-tokens"][$token] = time();//TODO clear out old tokens(otherwise thousands will accumulate) 89 trace('formtoken: $token, $targetscript, $action, $id', "$token, $targetscript, $action, $id");89 //trace('formtoken: $token, $targetscript, $action, $id', "$token, $targetscript, $action, $id"); 90 90 return $token; 91 91 } … … 103 103 return false; 104 104 105 unset($_SESSION['formtokens']["$name-tokens"][$token]); 105 106 return true; 106 107 } trunk/src/lyceum/wp-admin/upgrade-schema.php
r406 r426 182 182 FULLTEXT (`textdata`) 183 183 ) ENGINE = MyIsam; 184 CREATE TABLE $wpdb->sessions ( 185 id varchar(32) NOT NULL, 186 access int(10) unsigned, 187 data text, 188 PRIMARY KEY (id) 189 ) ENGINE = InnoDB; 184 190 "; 185 191 trunk/src/lyceum/wp-comments-post.php
r370 r426 6 6 $comment_post_ID = (int) $_POST['comment_post_ID']; 7 7 assert('hv($comment_post_ID)'); 8 if (!tokenIsValid($_REQUEST['token'], basename(__FILE__), 'default', $comment_post_ID)) 9 die("token is not valid"); 10 8 11 $status = $wpdb->get_row("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'"); 9 12 trunk/src/lyceum/wp-content/themes/default/comments.php
r370 r426 75 75 <form action="<?php echo get_option('siteurl'); ?>/<?=comments_post_name()?>" method="post" id="commentform"> 76 76 <?=bloginput()?> 77 <?=tokeninput(comments_post_name(), 'default', $id)?> 77 78 78 79 <?php if ( $user_ID ) : ?> trunk/src/lyceum/wp-settings.php
r389 r426 87 87 $wpdb->usermeta = $table_prefix . 'usermeta'; 88 88 $wpdb->blogs = $table_prefix . 'blogs'; 89 $wpdb->postsearch = $table_prefix . 'postsearch'; 89 $wpdb->postsearch = $table_prefix . 'postsearch'; 90 $wpdb->sessions = $table_prefix . 'sessions'; 90 91 91 92 $wpdb->prefix = $table_prefix; … … 151 152 require (ABSPATH . WPINC . '/version.php'); 152 153 require (ABSPATH . '../lib/functions.php'); 154 require (ABSPATH . '../lib/session.php'); 153 155 154 156 //TODO use cache … … 271 273 register_shutdown_function('shutdown_action_hook'); 272 274 275 session_start(); 276 273 277 // Everything is loaded and initialized. 274 278 do_action('init');
