Skip to content

Commit 2862ce2

Browse files
committed
fix watermark 403 bug
1 parent 1f6fd3f commit 2862ce2

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cos-php-sdk-v5 Upgrade Guide
22
====================
3+
2.4.3 to 2.4.4
4+
---------
5+
- 修复图片水印签名问题
6+
37
2.4.2 to 2.4.3
48
---------
59
- 优化审核接口返回相关字段

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
* @see \Qcloud\Cos\Service::getService()
115115
*/
116116
class Client extends GuzzleClient {
117-
const VERSION = '2.4.3';
117+
const VERSION = '2.4.4';
118118

119119
public $httpClient;
120120

src/CommandToRequestTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ public function ciParamTransformer( CommandInterface $command, $request ) {
210210
$uri = $request->getUri();
211211
$query = $uri->getQuery();
212212
if($query){
213-
$query .= "&" . $command['ImageHandleParam'];
213+
$query .= "&" . urlencode($command['ImageHandleParam']);
214214
}else{
215-
$query .= $command['ImageHandleParam'];
215+
$query .= urlencode($command['ImageHandleParam']);
216216
}
217217
$uri = $uri->withQuery($query);
218218
$request = $request->withUri( $uri );

src/Signature.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function createAuthorization( RequestInterface $request, $expires = '+30
7474
foreach ( explode( '&', $request->getUri()->getQuery() ) as $query ) {
7575
if (!empty($query)) {
7676
$tmpquery = explode( '=', $query );
77-
$key = strtolower( urlencode($tmpquery[0]) );
77+
$key = strtolower( $tmpquery[0] );
7878
if (count($tmpquery) >= 2) {
7979
$value = $tmpquery[1];
8080
} else {

0 commit comments

Comments
 (0)