One of our clients had a filtering proxy that returned a message to the effect that the updates.drupal.org server was blocked as its use was unfit for a corporate environment (must be the titillating combination of the words "up", "date" and "release"). Instead of returning a normal error however it was returning a full HTML document -- like every single filtering proxy from a company rhyming with San Francisco I have ever seen --, which made the SimpleXMLParser (with Warnings on) crash with lots of error messages right away and without useful information. So this patch just adds a sanity check to make sure that the returned document is indeed XML and, if for any reason it is not, to display the same error message as if the serverw as unreachable (which is the case).

As the update process no longer crashes at the first check however, modules pulling update information from private URLs will have a chance (hopefully) to get, hm..., full satisfaction.

Comments

MisterSpeed’s picture

To test the old behaviour just temporarily add this at line 158 in update.fetch.inc:

$data = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head></head><body></body></html>';

Status: Needs review » Needs work

The last submitted patch, update.fetch_.inc_.patch, failed testing.

pvmchau’s picture

StatusFileSize
new552 bytes

The new patch with fixing in #1

pvmchau’s picture

Status: Needs work » Needs review

update.fetch_.inc_.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, update.fetch_.inc_.patch, failed testing.

pvmchau’s picture

StatusFileSize
new617 bytes

Re-upload patch in #3 with right format.

MisterSpeed’s picture

Status: Needs work » Needs review

Forcing the status change

Status: Needs review » Needs work

The last submitted patch, update-warning-issue1847286.patch, failed testing.

thehong’s picture

Version: 7.17 » 7.x-dev
Status: Needs work » Needs review
StatusFileSize
new513 bytes

Up!

mgifford’s picture

Assigned: MisterSpeed » Unassigned
Issue summary: View changes

Patch still applies which is great.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.