Fix for possible file inclusion vulnerability in i18n.php

This commit is contained in:
Anton Reutov 2021-08-16 12:36:08 +03:00 committed by GitHub
parent df9377519e
commit 6fdfef4e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,7 +24,7 @@ function _translate() {
// Load language file (if not loaded yet)
if (!isset($LANG[$l])) {
require_once($_SERVER['DOCUMENT_ROOT']."/inc/i18n/$l.php");
require_once($_SERVER['DOCUMENT_ROOT']."/inc/i18n/".basename($l).".php");
}
//if (!isset($LANG[$l][$key])) file_put_contents('/somewhere/something.log', "$key\n", FILE_APPEND);