Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In the add preset form you can enter in any name for a preset, and even enter a namespace that has already been used. It appears this is because incorrect usage of '#validate' in imagecache_ui_preset_add_form()
, and incorrect usage of in_array
(in_array does not recursively search for needle) in the validation function.
Comment | File | Size | Author |
---|---|---|---|
#5 | imagecache_ui.patch | 984 bytes | q0rban |
#2 | imagecache_ui.patch | 2.45 KB | q0rban |
#1 | imagecache_ui.patch | 1.72 KB | q0rban |
imagecache_ui.patch | 1.7 KB | q0rban |
Comments
Comment #1
q0rban CreditAttribution: q0rban commentedOh, I guess we should make the namespace element required as well. Otherwise you can actually leave the field empty and still pass validation.
Comment #2
q0rban CreditAttribution: q0rban commentedSame problems in preset edit form.
Comment #3
drewish CreditAttribution: drewish commentedgood catches, thanks. committed to HEAD.
Comment #4
drewish CreditAttribution: drewish commentedre-opening after #370399: The namespace you have chosen is already in use.
Comment #5
q0rban CreditAttribution: q0rban commentedAs far as I can tell, there's really no reason for anyone to be able to edit the namespace after it's been created. I don't see anything in there handling the move of the imagecache directory that's been created. So, I just removed the textfield for the presetname and the validation call for the edit form.
Comment #6
drewish CreditAttribution: drewish commentedthat seems reasonable to me. follows the views and cck pattern. and once #255421: Patch for imagecache preset exporting lands you could export it and import with a new name
Comment #7
drewish CreditAttribution: drewish commentedcommitted to HEAD.