Skip to content

Commit

Permalink
fix: add realpath to captcha font filepath, #314
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Nov 4, 2022
1 parent bff5916 commit 7edda0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 7edda0e

Please sign in to comment.