mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Fix security vuln
Special thanks to Mina for finding this
This commit is contained in:
parent
54a573b815
commit
647308216a
|
|
@ -749,6 +749,8 @@ if (function_exists('dirindex_intro')) {
|
|||
$has_sprites = false;
|
||||
$special_sprites = function_exists('dirindex_sprites');
|
||||
$view = $_GET['view'] ?? ($special_sprites ? 'sprites' : 'dir');
|
||||
if (!ctype_alnum($view)) die('Access denied; invalid view');
|
||||
|
||||
if ($special_sprites || array_key_exists($rel_dir, $sprites_whitelist)) {
|
||||
$has_sprites = true;
|
||||
if ($view === 'sprites') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user