Skip to content

Commit

Permalink
Fixed a potential security problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Feb 9, 2014
1 parent 7f5f763 commit 1ba1938
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2.0.2-stable (2014-02-09)
* Fixed: Potential security problem in the client.

2.0.1-stable (2014-01-09)
* Fixed: getBodyAsString on an empty body now works.
* Fixed: Version string
Expand Down
6 changes: 4 additions & 2 deletions lib/Sabre/HTTP/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,10 @@ protected function createCurlSettingsArray(RequestInterface $request) {
$settings[CURLOPT_PUT] = true;
$settings[CURLOPT_INFILE] = $request->getBody();
} else {
// Else, it's a string.
$settings[CURLOPT_POSTFIELDS] = $body;
// For security we cast this to a string. If somehow an array could
// be passed here, it would be possible for an attacker to use @ to
// post local files.
$settings[CURLOPT_POSTFIELDS] = (string)$body;
}
$settings[CURLOPT_CUSTOMREQUEST] = $request->getMethod();
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/Sabre/HTTP/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Version {
/**
* Full version number
*/
const VERSION = '2.0.1';
const VERSION = '2.0.2';

}

0 comments on commit 1ba1938

Please sign in to comment.