Skip to content

Commit 342d918

Browse files
author
李仕鹏
committed
Merge branch 'czh/wx_encode' into 'master'
微信签名特殊字符没有转义 See merge request !4
2 parents 4438c8b + 7151f50 commit 342d918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Wechat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function JsSign(&$arr=[])
104104
'&noncestr=' . $arr['noncestr'] .
105105
'&timestamp=' . $arr['timestamp'] .
106106
'&url=' . $arr['url'];
107-
return sha1($plain);
107+
return sha1(str_replace('|', '%7C', $plain));
108108
}
109109

110110
public function __call($method, $args)

0 commit comments

Comments
 (0)