r68761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68760‎ | r68761 | r68762 >
Date:05:30, 30 June 2010
Author:tstarling
Status:ok
Tags:
Comment:
Fix error suppression from r63209.
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -881,7 +881,13 @@
882882 }
883883
884884 public function installSecretKey() {
885 - $file = wfIsWindows() ? null : @fopen( "/dev/urandom", "r" );
 885+ if ( wfIsWindows() ) {
 886+ $file = null;
 887+ } else {
 888+ wfSuppressWarnings();
 889+ $file = fopen( "/dev/urandom", "r" );
 890+ wfRestoreWarnings();
 891+ }
886892 if ( $file ) {
887893 $secretKey = bin2hex( fread( $file, 32 ) );
888894 fclose( $file );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63209Generate secret key, warn if insecuredemon17:00, 3 March 2010

Status & tagging log