phpmongodb / phpmongodb-1

http://www.phpmongodb.org
GNU General Public License v3.0
82 stars 39 forks source link

Fixed crash on invalid query #15

Open UCIS opened 9 years ago

UCIS commented 9 years ago

507c313: If the query fails because it contains invalid operators, phpmongodb will attempt to call a function on a non-object and crashes.

bf46a14: phpmongodb puts the raw representation of the MongoCursor directly in the HTML document. This can result in HTML injection if the Mongo documents contain HTML content. This patch fixes that by encoding the stringified representation of the MongoCursor.