Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
system.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
16 Dec 2007 at 22:29 UTC
Updated:
11 Feb 2008 at 19:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
theborg commented-Added 403 and 404 paths validation.
-Added site frontpage path validation.
Incorrect path can render the site useless, the system must alert the admin user.
Comment #2
catchHeh, well found.
Tested with and without the patch, handles all the cases well, error text is fine, code style looks clean to me.
Comment #3
gábor hojtsyWell, well, all core or contrib settings forms are wrapped in system_settings_form(), so centralizing their validation here is not exactly a good idea. Actually, each form should have its own validation function, not one central handler.
Comment #4
douggreen commentedAnd here it is applied to each of the two forms.
Comment #5
gábor hojtsyThats just two of the three from the patch.
Comment #6
theborg commentedDe-centralized validation of system forms.
Comment #7
catchComment #8
gábor hojtsyCode looks good. Feel free to RTBC if it works as well :)
Comment #9
panchoSome more changes:
Tested, works.
Comment #10
catchIt works.
edit: cross posted. #6 and #9 both work :P
Comment #11
catchshould note I agree with making them required per #9 - so should probably go with that one.
Comment #12
gábor hojtsyLooks good, thanks, committed #9.
Comment #13
panchoWhile testing this, I came up with #202393. Though it's featureish, I think it would further improve validation.
Comment #14
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #15
zoo33 commentedUnfortunately there's a new bug introduced by this patch.
The patch adds validation for the JPEG quality option on the Image toolkit page. However, that option is not defined in system.admin.inc, but in image.gd.inc, which means it will only be present in the form when the GD toolkit is used. If another toolkit is chosen, the form will falsely complain about invalid values for the JPEG quality and no further changes to the settings are possible after that point, leaving the user with a broken image toolkit.
Attached is a patch against current DRUPAL-6 which moves the validation to image.gd.inc.
To test this, use image.imagemagick.inc from the Image module (you will however need a patch for that file which I am about to post to #181809).
Please consider committing this before the next RC – people will probably start trying to use ImageMagick soon. Thanks!
Comment #16
theborg commentedTested and it works ok for me.
Comment #17
gábor hojtsyHm, a bit more testing would be great here.
Comment #18
zoo33 commentedFor what it's worth, I did test it myself. GD and ImageMagick both seem to work. But yes, more testers would be great.
For convenience, I'm attaching my patched copy of image.imagemagick.inc. Testers should install it in their includes directory, and make sure to rename it to "image.imagemagick.inc" in case it's been renamed somewhere along the way. Without the patch above you should see an error about invalid JPEG quality when you try to switch to IM, and those should go away once you apply said patch. And, obviously, image operations (such as downscaling of profile pictures) should still be working – both with GD and IM!
Comment #19
dries commentedThere is another patch in the queue that removes validation of 403/404 handler paths: http://drupal.org/node/209584. It might be unrelated, but I figured I'd point this out. :)
Comment #20
gábor hojtsyOn second look, #15 looks quite right, so committed, thanks.
Comment #21
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #22
Freso commentedApparently, the issue at #138433: Anonymous and default front page fields should be required was a duplicate of this, so I thought I'd raise me concern from there, here: