xi_wechat_corp 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c109c81bff8d13daf9242207b0239b4cc09d7d32
|
4
|
+
data.tar.gz: 7616d63d571138f5992d03ca0171bdc6010424c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e20ca22e76380506c320226b3046764651e71f682528cd1d0671dc5f84242b76dcff5af0ea9899ebee76ece1a76868a4e7ddd69a6db068554b42e2c57e4fdcc3
|
7
|
+
data.tar.gz: e70eae4d05307646c2250414a0b109518140a2c5d9bf5b74503bdfe48e02201595f864e106fb36af49b1328f1542723f656cac3b75856ccb83f4410931bb50ee
|
@@ -25,7 +25,7 @@ module XiWechatCorp
|
|
25
25
|
[
|
26
26
|
SecureRandom.random_bytes(16),
|
27
27
|
[text.bytesize].pack('N'),
|
28
|
-
text,
|
28
|
+
text.force_encoding('ASCII-8BIT'),
|
29
29
|
@corp_id
|
30
30
|
].join('')
|
31
31
|
end
|
@@ -35,7 +35,7 @@ module XiWechatCorp
|
|
35
35
|
output = corp_id.slice!(0, size)
|
36
36
|
|
37
37
|
raise InvalidCorpIDError.new(corp_id) if corp_id != @corp_id
|
38
|
-
output
|
38
|
+
output.force_encoding('UTF-8')
|
39
39
|
end
|
40
40
|
|
41
41
|
def pad(text)
|
@@ -37,7 +37,7 @@ module XiWechatCorp
|
|
37
37
|
cryptor = AesCrypt.new(credentials.aes_key, credentials.corp_id)
|
38
38
|
signer = SHA1Signer.new(credentials.token)
|
39
39
|
query_params = parse_query(rack_request.query_string)
|
40
|
-
Request.new(cryptor, signer, query_params, rack_request.body)
|
40
|
+
Request.new(cryptor, signer, query_params, rack_request.body.read)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|