New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAPTCHA doesn't work without GD #4361
Comments
Specifically: the check for fonts looks for a folder that contains the font images having the same name as a .gdf file in the fonts folder. Given that the font might be called AnonymousPro and the folder be 'anon', this isn't going to work out. Additionally, anon has mixed case filenames, which is also bad. |
It would be easy enough to check for GD support on install & upgrade. Based on prior discussion (#4148), I thought GD library was standard with php installs. I could never find a doc explicitly stating that, though. So maybe it is safest to add a test. Would a check for a specific font name also be appropriate? I'm not sure what to do about potential font issues. Should that be an install/upgrade test, or a test upon enabling the feature? |
We found out about it on the basis that we were doing tests using Cloud9 which doesn't ship any of the PHP extensions by default (as it's based on Debian). Surprising what breaks under that situation. In the case of the fonts - there's several fonts of font fallback images, which could be used but fail to be used because the names don't match what is expected. This list of viable replacements could be determined by what files exist or could be determined by a preset hardcoded list. Either works. |
As an FYI - GD is listed as a recommendation in 2.0.x: Still, I agree the edit is smart to do. I'm still thinking about the font. What I've read indicates GD has a set of 'default' fonts with simple stupid names, "1" "2" "3" "4" and "5" that correspond to different sizes. If we use the default font, that may sidestep any potential issues with a font not found. |
That's not the problem. If you don't have GD, you can't use GD's fonts - so you have to use the image fallbacks that are given - look in the theme folder, you'll see a fonts folder in which are folders containing pre-made images for the CAPTCHA. The problem is that SMF in its current code cannot find those folders and thus those images. There isn't a problem if GD is enabled, which is what everyone's been testing with. |
Ah, thanks... So if we make GD a requirement, there is no issue. I'm leaning towards making GD a requirement, myself... It is implemented pretty broadly. (Those builds with NO addons like Cloud9 strike me as a special form of masochism...) |
i thought when i changed the font for the CAPTCHA i created the images with the correct names so they would work. i believe i had tested with GD disabled but i cant recall. |
@MissAllSunday is this really a RC4 requirement? Please remove the label. OR... Let's discuss a specific change needed... |
As it can be seen on the issue's history, the original label for the issue was Final, that was back when there wasn't an RC4 label created yet. Fell free to re-label it for the original target which was Final. |
I think we should remove the label. This shouldn't hold up either rc4 or final. It appears to be an unusual edge condition for certain minimalistic builds. |
Indeed, our priorities have changed and we must adjust the current opened issues to reflect that. |
After much suffering to test this, I cannot reproduce it. |
If GD is not present - and it's never indicated that it is mandatory - the image CAPTCHA fails to load the pure image fallbacks that are present.
Either the GD library should be made clear to be a dependency like mbstring is, or the fallback should work.
The text was updated successfully, but these errors were encountered: