Merge "(bug 43211) Add mw-navigation to CSS for display:none on print."
[lhc/web/wiklou.git] / maintenance / locking / LockServerDaemon.php
index c591665..4358989 100644 (file)
@@ -242,7 +242,9 @@ class LockServerDaemon {
                $m = explode( ':', $data ); // <session, key, command, type, values>
                if ( count( $m ) == 5 ) {
                        list( $session, $key, $command, $type, $values ) = $m;
-                       if ( sha1( $session . $command . $type . $values . $this->authKey ) !== $key ) {
+                       $goodKey = hash_hmac( 'sha1',
+                               "{$session}\n{$command}\n{$type}\n{$values}", $this->authKey );
+                       if ( $goodKey !== $key ) {
                                return 'BAD_KEY';
                        } elseif ( strlen( $session ) !== 32 ) {
                                return 'BAD_SESSION';