Changeset 2757
- Timestamp:
- Oct 16, 2008, 2:38:26 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comments.php
r2299 r2757 66 66 $page['sort_by'] = 'date'; 67 67 // if the form was submitted, it overloads default behaviour 68 if (isset($_GET['sort_by']) )68 if (isset($_GET['sort_by']) and isset($sort_by[$_GET['sort_by']]) ) 69 69 { 70 70 $page['sort_by'] = $_GET['sort_by']; … … 75 75 $page['sort_order'] = 'DESC'; 76 76 // if the form was submitted, it overloads default behaviour 77 if (isset($_GET['sort_order']) )77 if (isset($_GET['sort_order']) and isset($sort_order[$_GET['sort_order']])) 78 78 { 79 79 $page['sort_order'] = $_GET['sort_order']; -
trunk/include/functions_session.inc.php
r2521 r2757 67 67 ini_set('session.use_only_cookies', $conf['session_use_only_cookies']); 68 68 ini_set('session.use_trans_sid', intval($conf['session_use_trans_sid'])); 69 ini_set('session.cookie_httponly', 1); 69 70 } 70 71 session_name($conf['session_name']); -
trunk/include/functions_user.inc.php
r2752 r2757 1014 1014 { 1015 1015 $cookie = $user_id.'-'.$now.'-'.$key; 1016 setcookie($conf['remember_me_name'], 1016 if (version_compare(PHP_VERSION, '5.2', '>=') ) 1017 { 1018 setcookie($conf['remember_me_name'], 1017 1019 $cookie, 1018 1020 time()+$conf['remember_me_length'], 1019 cookie_path() 1021 cookie_path(),ini_get('session.cookie_domain'),ini_get('session.cookie_secure'), 1022 ini_get('session.cookie_httponly') 1020 1023 ); 1024 } 1025 else 1026 { 1027 setcookie($conf['remember_me_name'], 1028 $cookie, 1029 time()+$conf['remember_me_length'], 1030 cookie_path(),ini_get('session.cookie_domain'),ini_get('session.cookie_secure') 1031 ); 1032 } 1021 1033 } 1022 1034 } 1023 1035 else 1024 1036 { // make sure we clean any remember me ... 1025 setcookie($conf['remember_me_name'], '', 0, cookie_path() );1037 setcookie($conf['remember_me_name'], '', 0, cookie_path(),ini_get('session.cookie_domain')); 1026 1038 } 1027 1039 if ( session_id()!="" ) … … 1063 1075 } 1064 1076 } 1065 setcookie($conf['remember_me_name'], '', 0, cookie_path() );1077 setcookie($conf['remember_me_name'], '', 0, cookie_path(),ini_get('session.cookie_domain')); 1066 1078 } 1067 1079 return false; … … 1091 1103 trigger_action('login_failure', $username); 1092 1104 return false; 1105 } 1106 1107 /** Performs all the cleanup on user logout */ 1108 function logout_user() 1109 { 1110 global $conf; 1111 $_SESSION = array(); 1112 session_unset(); 1113 session_destroy(); 1114 setcookie(session_name(),'',0, 1115 ini_get('session.cookie_path'), 1116 ini_get('session.cookie_domain') 1117 ); 1118 setcookie($conf['remember_me_name'], '', 0, cookie_path(),ini_get('session.cookie_domain')); 1093 1119 } 1094 1120 -
trunk/include/user.inc.php
r2425 r2757 30 30 if (isset($_GET['act']) and $_GET['act'] == 'logout') 31 31 { // logout 32 $_SESSION = array(); 33 session_unset(); 34 session_destroy(); 35 setcookie(session_name(),'',0, 36 ini_get('session.cookie_path'), 37 ini_get('session.cookie_domain') 38 ); 39 setcookie($conf['remember_me_name'], '', 0, cookie_path()); 32 logout_user(); 40 33 redirect(make_index_url()); 41 34 } -
trunk/include/ws_functions.inc.php
r2683 r2757 1188 1188 function ws_session_logout($params, &$service) 1189 1189 { 1190 global $user, $conf;1191 1190 if (!is_a_guest()) 1192 1191 { 1193 $_SESSION = array(); 1194 session_unset(); 1195 session_destroy(); 1196 setcookie(session_name(),'',0, 1197 ini_get('session.cookie_path'), 1198 ini_get('session.cookie_domain') 1199 ); 1200 setcookie($conf['remember_me_name'], '', 0, cookie_path()); 1192 logout_user(); 1201 1193 } 1202 1194 return true; … … 1436 1428 1437 1429 invalidate_user_cache(); 1438 1430 1439 1431 return $creation_output; 1440 1432 } … … 1474 1466 PREG_SPLIT_NO_EMPTY 1475 1467 ); 1476 1468 1477 1469 $query = ' 1478 1470 SELECT … … 1480 1472 md5sum 1481 1473 FROM '.IMAGES_TABLE.' 1482 WHERE md5sum IN (\''.implode("','", $md5sums).'\') 1474 WHERE md5sum IN (\''.implode("','", $md5sums).'\') 1483 1475 ;'; 1484 1476 $id_of_md5 = simple_hash_from_query($query, 'md5sum', 'id'); 1485 1477 1486 1478 $result = array(); 1487 1479 1488 1480 foreach ($md5sums as $md5sum) 1489 1481 { -
trunk/plugins/event_tracer/event_list.php
r2254 r2757 17 17 { 18 18 $files = array_merge($files, get_php_files($path.'/'.$node, $to_ignore)); 19 19 20 20 } 21 21 if ( is_file($path.'/'.$node) ) … … 44 44 $code = preg_replace( '#\/\*.*\*\/#m', '', $code); 45 45 $code = preg_replace( '#\/\/.*#', '', $code); 46 46 47 47 $count = preg_match_all( 48 48 '#[^a-zA-Z_$-]trigger_(action|event)\s*\(\s*([^,)]+)#m', … … 58 58 } 59 59 60 $sort= isset($_GET['sort']) ? $_GET['sort'] : 1;60 $sort= isset($_GET['sort']) ? (int)$_GET['sort'] : 1; 61 61 usort( 62 62 $events,
Note: See TracChangeset
for help on using the changeset viewer.