Changeset 7495 for trunk/include/functions_comment.inc.php
- Timestamp:
- Oct 30, 2010, 1:32:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_comment.inc.php
r6604 r7495 120 120 } 121 121 122 $key = explode( ':', @$key ); 123 if ( count($key)!=2 124 or $key[0]>time()-2 // page must have been retrieved more than 2 sec ago 125 or $key[0]<time()-3600 // 60 minutes expiration 126 or hash_hmac( 127 'md5', $key[0].':'.$comm['image_id'], $conf['secret_key'] 128 ) != $key[1] 129 ) 122 if ( !verify_ephemeral_key(@$key, $comm['image_id']) ) 130 123 { 131 124 $comment_action='reject'; … … 249 242 $comment_action = 'validate'; 250 243 251 $key = explode( ':', $post_key ); 252 if ( count($key)!=2 253 or $key[0]>time()-2 // page must have been retrieved more than 2 sec ago 254 or $key[0]<time()-3600 // 60 minutes expiration 255 or hash_hmac('md5', $key[0].':'.$comment['image_id'], $conf['secret_key'] 256 ) != $key[1] 257 ) 244 if ( !verify_ephemeral_key($post_key, $comment['image_id']) ) 258 245 { 259 246 $comment_action='reject';
Note: See TracChangeset
for help on using the changeset viewer.