Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
update.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2011 at 13:32 UTC
Updated:
21 Nov 2011 at 20:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
damienmckennaPatch attached that ensures only numeric values are added to time().
Comment #2
damienmckennaI looked at update.test to see where tests could be added, any suggestions on how to test this? Maybe setting a string or object value on update_max_fetch_time and testing that it doesn't give an error?
Comment #3
bfroehle commentedI'm do not think this level of babysitting is really necessary. The Drupal way seems to be to do validation on entering items into the database, but no validation when you retrieve them. If you go mess around with the variables and set one to an improper value, well that's your own fault. So generally I'm against this patch.
However, if this is destined for inclusion, I think using is_numeric() would be more appropriate than is_object() as proposed in #2.
Comment #4
bfroehle commentedThe inclusion of a page to change the setting like in #1091992: Provide UI element to modify 'update_max_fetch_time' variable would have the validation there anyway.
Comment #5
bfroehle commentedNowhere else in Drupal do we do this level of babysitting. As far as I'm concerned, manually changing variables falls into the you break it, you buy it category.
For a large discussion relating to this variable, see #952394: "No available releases found" - fetching update information exceeds timeout.