r69608 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69607‎ | r69608 | r69609 >
Date:13:11, 20 July 2010
Author:catrope
Status:deferred
Tags:
Comment:
Followup to r69553: double-escape arguments because we're feeding them to a shell twice
Modified paths:
  • /trunk/phase3/maintenance/addwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/addwiki.php
@@ -150,12 +150,13 @@
151151 # passthru( '/home/wikipedia/conf/interwiki/update' );
152152
153153 $time = wfTimestamp( TS_RFC2822 );
154 - $escDbName = wfEscapeShellArg( $dbname );
155 - $escTime = wfEscapeShellArg( $time );
156 - $escUcsite = wfEscapeShellArg( $ucsite );
157 - $escName = wfEscapeShellArg( $name );
158 - $escLang = wfEscapeShellArg( $lang );
159 - $escDomain = wfEscapeShellArg( $domain );
 154+ // These arguments need to be escaped twice: once for echo and once for at
 155+ $escDbName = wfEscapeShellArg( wfEscapeShellArg( $dbname ) );
 156+ $escTime = wfEscapeShellArg( wfEscapeShellArg( $time ) );
 157+ $escUcsite = wfEscapeShellArg( wfEscapeShellArg( $ucsite ) );
 158+ $escName = wfEscapeShellArg( wfEscapeShellArg( $name ) );
 159+ $escLang = wfEscapeShellArg( wfEscapeShellArg( $lang ) );
 160+ $escDomain = wfEscapeShellArg( wfEscapeShellArg( $domain ) );
160161 shell_exec( "echo notifyNewProjects $escDbName $escTime $escUcsite $escName $escLang $escDomain | at now + 15 minutes" );
161162
162163 $this->output( "Script ended. You still have to:

Follow-up revisions

RevisionCommit summaryAuthorDate
r696191.16wmf4: Merge addwiki.php tweaks from trunk: r69546, r69553, r69554, r69608...catrope15:04, 20 July 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69553Followup to r69546: defer sending of notification by 15 minutescatrope15:13, 19 July 2010

Status & tagging log