From f4251e35211288fb9fc03aff725a334204448008 Mon Sep 17 00:00:00 2001 From: Miha Petkovsek Date: Wed, 13 Jul 2016 09:14:39 +0200 Subject: Added urlencode to encrypted parameters --- php-client/class.phpipam-api.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'php-client/class.phpipam-api.php') 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); } -- cgit v1.2.3