From 7edda0e95d780a030fa171cb869aa9ed7d291521 Mon Sep 17 00:00:00 2001 From: ikkez Date: Fri, 4 Nov 2022 19:14:50 +0100 Subject: [PATCH] fix: add realpath to captcha font filepath, #314 --- image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image.php b/image.php index 367ca6e3..850bf8f6 100644 --- a/image.php +++ b/image.php @@ -414,7 +414,7 @@ function captcha($font,$size=24,$len=5, } $fw=Base::instance(); foreach ($fw->split($path?:$fw->UI.';./') as $dir) - if (is_file($path=$dir.$font)) { + if (is_file($path=realpath($dir.$font))) { $seed=strtoupper(substr( $ssl?bin2hex(openssl_random_pseudo_bytes($len)):uniqid(), -$len));