aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-07-13 09:14:39 +0200
committerGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-07-13 09:14:39 +0200
commitf4251e35211288fb9fc03aff725a334204448008 (patch)
tree1e7a71f77db62d642fd08302dbb202ecff39c86c
parent29f281d7d4232fb69fadd6931b4267b5c45fc6b3 (diff)
downloadphpipam-api-clients-f4251e35211288fb9fc03aff725a334204448008.tar.gz
Added urlencode to encrypted parameters
-rw-r--r--php-client/class.phpipam-api.php3
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);
}