Index: trunk/phase3/includes/User.php |
— | — | @@ -1689,13 +1689,12 @@ |
1690 | 1690 | */ |
1691 | 1691 | function matchEditToken( $val, $salt = '' ) { |
1692 | 1692 | global $wgMemc; |
1693 | | - |
1694 | | -/* |
1695 | | - if ( !isset( $_SESSION['wsEditToken'] ) ) { |
| 1693 | + $sessionToken = $this->editToken( $salt ); |
| 1694 | + if ( $val != $sessionToken ) { |
1696 | 1695 | $logfile = '/home/wikipedia/logs/session_debug/session.log'; |
1697 | 1696 | $mckey = memsess_key( session_id() ); |
1698 | 1697 | $uname = @posix_uname(); |
1699 | | - $msg = "wsEditToken not set!\n" . |
| 1698 | + $msg = date('r') . "\nEdit token mismatch, expected $sessionToken got $val\n" . |
1700 | 1699 | 'apache server=' . $uname['nodename'] . "\n" . |
1701 | 1700 | 'session_id = ' . session_id() . "\n" . |
1702 | 1701 | '$_SESSION=' . var_export( $_SESSION, true ) . "\n" . |
— | — | @@ -1704,8 +1703,7 @@ |
1705 | 1704 | |
1706 | 1705 | @error_log( $msg, 3, $logfile ); |
1707 | 1706 | } |
1708 | | -*/ |
1709 | | - return ( $val == $this->editToken( $salt ) ); |
| 1707 | + return $val == $sessionToken; |
1710 | 1708 | } |
1711 | 1709 | |
1712 | 1710 | /** |