Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Jun 2003 at 17:35 UTC
Updated:
23 Mar 2004 at 01:20 UTC
I am the debian developer who maintains the Drupal debian package. I need a reduced upgrade.php script less smart than the one included in version 4.2.0. This upgrade script for debian should apply all upgrades from update_46() function till the end to reach 4.2.0 db format, without user interact. I mean, the upgrades should be applied automatically only by calling the upgrade.php script in a browser, giving an output page with a succesful or failure message for each update function.
It should be an easy task for the upgrade.php author.
Hugo Espuny
hec@debian.org
Comments
Comment #1
dries commentedI already made some first simplifications to the update script. There is two more things I want to look at:
For the latter to be secure, we need some authentication mechanism or check to prevent that non-authorized people can upgrade your database. What about adding support for some parameters such that you can do:
wget http://sitename/update.php?username=$username&password=$passwordThe username and password could be that of user #1 or of the Drupal database. Which one is preferred? Other thoughts or ideas?
Comment #2
(not verified) commentedvariable.module (See contrib) uses a similar technique in order allow external apps to update the variable table. I like it. -moshe
Comment #3
hec-1 commentedReally i think this is not needed, as the installation scripts copy the upgrade.php to the web tree just before we call it to perform the upgrade, and deletes it just after. Also this won't add any security as this user and pass are publicly known, and there is no an easy way to change them to random ones on the fly. Also the attacker only have some microsecs to perform a call to upgrade.php.
But i will add an Apache directive to allow calling to upgrade.php only fron localhost. This should be enough.
Thanks for your work here, Dries.
Comment #4
dries commentedTrue but in the regular distribution (ie. Drupal's own distribution) we don't copy or remove the
update.phpscript. We need a security check.Now that I know how Debian updates a Drupal site (copy
update.php, executeupdate.php, removeupdate.php), I guess I can make it so that (1) you can easily comment out the security check and (2) perform an upgrade without user interaction.Comment #5
killes@www.drop.org commentedThe update functions were moved to update.inc.
Comment #6
(not verified) commented