Cleanup uploaded file names for db

This commit is contained in:
Retro_Guy 2021-06-08 05:30:09 +00:00
parent ad98fcb1fa
commit bbafaccb54
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ if(isset($_POST['username'])) {
include "head.inc";
if(isset($_FILES)) {
$_FILES[photo][name] = preg_replace('/[^a-zA-Z0-9\.]/', '_', $_FILES[photo][name]);
// Check auth here
if(isset($_POST['key']) && password_verify($CONFIG['thissitekey'].$_POST['username'], $_POST['key'])) {
if(check_bbs_auth($_POST['username'], $_POST['password'])) {