Skip to content
Browse files

Make sure there is never posted data on GET requests

This is an addition to the previous patch to make sure there can not
accidentally $data be passed on a GET request.

darcs-hash:20080331223807-7ad00-0f03763f15a9d907da6a53ed8b3c3e55b906fbc7.gz
  • Loading branch information...
1 parent 246fab0 commit 197e18727f7040bd95955282099e937995897f5d @splitbrain committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 inc/HTTPClient.php
View
2 inc/HTTPClient.php
@@ -197,6 +197,8 @@ function sendRequest($url,$data='',$method='GET'){
}
$headers['Content-Length'] = strlen($data);
$rmethod = 'POST';
+ }elseif($method == 'GET'){
+ $data = ''; //no data allowed on GET requests
}
if($this->user) {
$headers['Authorization'] = 'Basic '.base64_encode($this->user.':'.$this->pass);

0 comments on commit 197e187

Please sign in to comment.
Something went wrong with that request. Please try again.