mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Security measures (#330)
Co-authored-by: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
This commit is contained in:
parent
8e67737e92
commit
b720e6670e
@ -2811,7 +2811,7 @@ function hash_search ($hash)
|
||||
|
||||
$hash = htmlCHR(trim($hash));
|
||||
|
||||
if (!isset($hash) || mb_strlen($hash, 'UTF-8') != 40)
|
||||
if (!isset($hash) || mb_strlen($hash, 'UTF-8') != 40 || !ctype_xdigit($hash))
|
||||
{
|
||||
bb_die(sprintf($lang['HASH_INVALID'], $hash));
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ $confirmed = ( isset($_POST['confirm']) ) ? TRUE : 0;
|
||||
$delete = ( isset($_POST['delete']) ) ? TRUE : 0;
|
||||
$delete_all = ( isset($_POST['deleteall']) ) ? TRUE : 0;
|
||||
$save = ( isset($_POST['save']) ) ? TRUE : 0;
|
||||
$mode = isset($_REQUEST['mode']) ? (string) $_REQUEST['mode'] : '';
|
||||
$mode = isset($_REQUEST['mode']) ? htmlCHR($_REQUEST['mode']) : '';
|
||||
|
||||
$refresh = $preview || $submit_search;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user