diff options
author | Miha Petkovsek <miha.petkovsek@gmail.com> | 2016-07-13 09:14:39 +0200 |
---|---|---|
committer | Miha Petkovsek <miha.petkovsek@gmail.com> | 2016-07-13 09:14:39 +0200 |
commit | f4251e35211288fb9fc03aff725a334204448008 (patch) | |
tree | 1e7a71f77db62d642fd08302dbb202ecff39c86c /php-client/class.phpipam-api.php | |
parent | 29f281d7d4232fb69fadd6931b4267b5c45fc6b3 (diff) | |
download | phpipam-api-clients-f4251e35211288fb9fc03aff725a334204448008.tar.gz |
Added urlencode to encrypted parameters
Diffstat (limited to 'php-client/class.phpipam-api.php')
-rw-r--r-- | php-client/class.phpipam-api.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/php-client/class.phpipam-api.php b/php-client/class.phpipam-api.php index 32798bc..79f0e64 100644 --- a/php-client/class.phpipam-api.php +++ b/php-client/class.phpipam-api.php @@ -686,6 +686,9 @@ class phpipam_api_client { // create encrypted request $encrypted_request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->api_key, json_encode($params), MCRYPT_MODE_ECB)); + // escape + + $encrypted_request = urlencode($encrypted_request); + // reset url curl_setopt($this->Connection, CURLOPT_URL, $this->api_url."?app_id=".$this->api_app_id."&enc_request=".$encrypted_request); } |