Development

#3095 (createFromWeb() doesn't check for well-formed XML)

You must first sign up to be able to contribute.

Ticket #3095 (closed defect: worksforme)

Opened 2 years ago

Last modified 1 year ago

createFromWeb() doesn't check for well-formed XML

Reported by: garak Assigned to: Kris.Wallsmith
Priority: minor Milestone:
Component: sfFeed2Plugin Version: 1.0.10
Keywords: Cc:
Qualification: Unreviewed

Description

In sfFeedPeer.class.php at line 72, it's not checked if simplexml_load_string() returns false. So, line 72 can raise a Fatal error: Call to a member function getNamespaces() on a non-object. IMHO, a check is needed after line 72, like so:

if (false === $feedXML)
{
  return false;
}

and of course @return value in phpdoc comment should be adapted

Change History

10/31/08 19:35:06 changed by Kris.Wallsmith

  • owner changed from francois to Kris.Wallsmith.

11/01/08 20:54:24 changed by Stefan.Koopmanschap

  • status changed from new to closed.
  • resolution set to worksforme.

apparently this has already been taken care of in the current version of the sfFeed2Plugin. Handling is now done in the feed-format specific classes where an exception is being thrown in case XML is not well-formatted.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.