From 086ca4e60f403c802c554c870a906b3dcbe44736 Mon Sep 17 00:00:00 2001 From: jens1o Date: Sun, 23 Jul 2017 17:14:34 +0200 Subject: [PATCH] Fix parameter check in font/getFont.php See #2351 --- wcfsetup/install/files/font/getFont.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/font/getFont.php b/wcfsetup/install/files/font/getFont.php index 94ccf37e8e..16e0a5296f 100644 --- a/wcfsetup/install/files/font/getFont.php +++ b/wcfsetup/install/files/font/getFont.php @@ -19,11 +19,11 @@ $types = array( 'woff2' => 'font/woff2' // the specs at http://dev.w3.org/webfonts/WOFF2/spec/ are not perfectly clear, but font/woff2 seems to be the most sane one and is currently used by Google Fonts ); -// get parameters -$type = $_GET['type']; -$font = (!empty($_GET['font']) ? basename($_GET['font']) : 'fontawesome-webfont'); - -if (!empty($type)) { +if (!empty($_GET['type'])) { + // get parameters + $type = $_GET['type']; + $font = (!empty($_GET['font']) ? basename($_GET['font']) : 'fontawesome-webfont'); + if (isset($types[$type])) { if (file_exists($font . '.' . $type)) { $filename = $font . '.' . $type; -- 2.20.1