Changeset 21299 for branches/version-2_11-dev/data/module/SOAP/Fault.php
- Timestamp:
- 2011/10/25 00:02:55 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/module/SOAP/Fault.php
r20119 r21299 24 24 */ 25 25 26 /** PEAR_Error */ 26 27 require_once 'PEAR.php'; 27 28 … … 29 30 * PEAR::Error wrapper used to match SOAP Faults to PEAR Errors 30 31 * 31 * SOAP_Fault transmissions normally contain a complete backtrace of the32 * error. Revealing these details in a public web services is a bad idea33 * because it can be used by attackers. Backtrace information can be kept out34 * of SOAP_Fault responses by putting the following code in your script after35 * your"require_once 'SOAP/Server.php';" line:32 * SOAP_Fault can provide a complete backtrace of the error. Revealing these 33 * details in a public web services is a bad idea because it can be used by 34 * attackers. Thus you have to enable backtrace information in SOAP_Fault 35 * responses by putting the following code in your script after your 36 * "require_once 'SOAP/Server.php';" line: 36 37 * 37 38 * <code> 38 * $ skiptrace =& PEAR::getStaticProperty('PEAR_Error', 'skiptrace');39 * $ skiptrace = true;39 * $backtrace =& PEAR::getStaticProperty('SOAP_Fault', 'backtrace'); 40 * $backtrace = true; 40 41 * </code> 41 42 * … … 76 77 $msg = new SOAP_Base(); 77 78 $params = array(); 78 $params[] = new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:' . $this->code);79 $params[] = new SOAP_Value('faultcode', 'QName', SOAP_BASE::SOAPENVPrefix().':' . $this->code); 79 80 $params[] = new SOAP_Value('faultstring', 'string', $this->message); 80 81 $params[] = new SOAP_Value('faultactor', 'anyURI', $this->error_message_prefix); 81 if (isset($this->backtrace)) { 82 if (PEAR::getStaticProperty('SOAP_Fault', 'backtrace') && 83 isset($this->backtrace)) { 82 84 $params[] = new SOAP_Value('detail', 'string', $this->backtrace); 83 85 } else {
Note: See TracChangeset
for help on using the changeset viewer.