-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Lines 495 to 509 in e73aa39
| $response = curl_exec($curl); | |
| if ($response === false) { | |
| throw new \Exception('Could not do request to updater server: '.curl_error($curl)); | |
| } | |
| curl_close($curl); | |
| // Response can be empty when no update is available | |
| if ($response === '') { | |
| return []; | |
| } | |
| $xml = simplexml_load_string($response); | |
| if ($xml === false) { | |
| throw new \Exception('Could not parse updater server XML response'); | |
| } |
simplexml_load_string expects a well-formed xml document.
We should use curl_getinfo to check for the status code and the content type before parsing it.