Index: trunk/tools/codereview-proxy/index.php |
— | — | @@ -7,7 +7,19 @@ |
8 | 8 | ini_set( 'display_errors', false); |
9 | 9 | header('Content-type: application/x-php-serialized'); |
10 | 10 | |
11 | | -$data = runAction( "http://svn.wikimedia.org/svnroot/mediawiki" ); |
| 11 | +$allowedBases = array( |
| 12 | + 'http://svn.wikimedia.org/svnroot/mediawiki', |
| 13 | + 'http://svn.wikimedia.org/svnroot/pywikipedia', |
| 14 | + 'http://svn.wikimedia.org/svnroot/mysql', |
| 15 | +); |
| 16 | + |
| 17 | +$base = inputStr( 'base', $allowedBases[0] ); |
| 18 | +if ( !in_array( $base, $allowedBases ) ) { |
| 19 | + echo serialize( false ); |
| 20 | + exit; |
| 21 | +} |
| 22 | + |
| 23 | +$data = runAction( $base ); |
12 | 24 | echo serialize( $data ); |
13 | 25 | |
14 | 26 | function inputStr( $key, $default=null ) { |