SMF Development > Bug Reports

Multiline Maintenance Comment on Upgrade breaks upgrade

(1/1)

Kissaki:
I tried upgrading from recent 1.1.16 to SMF 2.0.2 via webinstall.
When in the upgrade script, leaving enabling maintenance checked I clicked customize to customize the maintenance description message. I entered a Text consisting of 3 lines.
Trying to start the upgrade, I got internal server errors and syntax errors in my PHP log.
Checking the Settings.php file the multi-line maintenance comment was written to the script file as a single-quoted string, the newlines not escaped, introducing syntax errors.

Fixing those (removing the newlines) I could continue with the upgrade until Step 51  (url param) / Executing: "Adjusting group types." (41 of 42 - of this script), where it times out.
On the first time-out it seems to have copied over the Settings_bak.php to Settings.php introducing the syntax error again. Fixing it in both files still leads to timeout - not sure (yet) if still a result of this issue or a separate issue.
(Update: It was actually my php-fcgi that crashed on that step, hence further AJAX-tries failed with gateway timeouts. Starting upgrade.php again, with the fixed Settings files, it worked.)

To fix this, the newlines being entered as the maintenance description should probably be escaped before saving to the settings file!?

emanuele:
Thanks Kissaki for the report!

Will take a look sooner (unless someone else wants to have the fun! :P).

Navigation

[0] Message Index

Go to full version