From 9d98736e32925e3603ce51f1c10acec2a75009ba Mon Sep 17 00:00:00 2001 From: GrabzIt Date: Fri, 10 Mar 2017 12:15:36 +0000 Subject: [PATCH] Fix for watermarks in PHP Some watermark identifiers were causing signature errors if they contained special characters such as backslashes. --- php/composer.json | 2 +- php/lib/GrabzItClient.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/php/composer.json b/php/composer.json index 1376719d..28334791 100644 --- a/php/composer.json +++ b/php/composer.json @@ -5,7 +5,7 @@ "homepage": "https://grabz.it/", "description": "Use our API to allow your app to create images and PDF's from URL's or raw HTML. Additionally GrabzIt allows you to convert online videos into animated GIF's or HTML tables into CSV's.", "license": "MIT", - "version":"3.0.2.3", + "version":"3.0.3", "autoload": { "classmap": [ "lib/GrabzItAnimationOptions.class.php", diff --git a/php/lib/GrabzItClient.class.php b/php/lib/GrabzItClient.class.php index 59d0f941..b252808c 100644 --- a/php/lib/GrabzItClient.class.php +++ b/php/lib/GrabzItClient.class.php @@ -449,11 +449,11 @@ public function AddWaterMark($identifier, $path, $xpos, $ypos) $content .= "--".$boundary."\r\n". "Content-Disposition: form-data; name=\"key\"\r\n\r\n". - urlencode($this->applicationKey) . "\r\n"; + $this->applicationKey . "\r\n"; $content .= "--".$boundary."\r\n". "Content-Disposition: form-data; name=\"identifier\"\r\n\r\n". - urlencode($identifier) . "\r\n"; + $identifier . "\r\n"; $content .= "--".$boundary."\r\n". "Content-Disposition: form-data; name=\"xpos\"\r\n\r\n".