web/lib/Zend/Gdata/Gapps/ServiceException.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
--- a/web/lib/Zend/Gdata/Gapps/ServiceException.php	Thu May 07 15:10:09 2015 +0200
+++ b/web/lib/Zend/Gdata/Gapps/ServiceException.php	Thu May 07 15:16:02 2015 +0200
@@ -16,9 +16,9 @@
  * @category   Zend
  * @package    Zend_Gdata
  * @subpackage Gapps
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: ServiceException.php 24593 2012-01-05 20:35:02Z matthew $
+ * @version    $Id$
  */
 
 
@@ -32,6 +32,9 @@
  */
 require_once 'Zend/Gdata/Gapps/Error.php';
 
+/** @see Zend_Xml_Security */
+require_once 'Zend/Xml/Security.php';
+
 /**
  * Gdata Gapps Exception class. This is thrown when an
  * AppsForYourDomainErrors message is received from the Google Apps
@@ -43,7 +46,7 @@
  * @category   Zend
  * @package    Zend_Gdata
  * @subpackage Gapps
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Gdata_Gapps_ServiceException extends Zend_Exception
@@ -160,10 +163,10 @@
             // exception by referencing $php_errormsg
             @ini_set('track_errors', 1);
             $doc = new DOMDocument();
-            $success = @$doc->loadXML($string);
+            $doc = @Zend_Xml_Security::scan($string, $doc);
             @ini_restore('track_errors');
 
-            if (!$success) {
+            if (!$doc) {
                 require_once 'Zend/Gdata/App/Exception.php';
                 // $php_errormsg is automatically generated by PHP if
                 // an error occurs while calling loadXML(), above.