MODx CMF

FS#1049 ? Captcha fails when there is a non-TTF file in the /ttf folder

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.9.6.1, 0.9.6.2-rc1
  • Fix Version/s: 0.9.6.2
  • Component/s: Core Distribution
  • Description:
    Hide

    If any other file is introduced into the /manager/includes/ttf folder (e.g. a lock file introduced by Dreamweaver) it causes the Captcha to randomly fail, as the random font file chosen does not check it is a .ttf file before using it.

    Solution - add a basic check that the font file being used has a .ttf extension

    Replace line 114:
    if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file)) {

    with:
    if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file) && substr($file, -4) == '.ttf') {

    Show
    If any other file is introduced into the /manager/includes/ttf folder (e.g. a lock file introduced by Dreamweaver) it causes the Captcha to randomly fail, as the random font file chosen does not check it is a .ttf file before using it. Solution - add a basic check that the font file being used has a .ttf extension Replace line 114: if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file)) { with: if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file) && substr($file, -4) == '.ttf') {

Activity

There are no comments yet on this issue.

People

Dates

  • Created:
    04/Jul/08 6:00 AM
    Updated:
    18/Sep/08 8:31 PM
    Resolved:
    18/Sep/08 8:30 PM