wechat 0.8.11 → 0.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 286b9044ac0251344656ec83b579f90ee2c7f87c
4
- data.tar.gz: 0cca2037ba22fdeaa014ff5ba22bacf9f1de8c69
3
+ metadata.gz: 19c62c7ee55f6bebe9d592e5af74eef51bb46efd
4
+ data.tar.gz: 8f763e172346efbf8fb9e011a5ffecc0fe0da52f
5
5
  SHA512:
6
- metadata.gz: 96bfbb1119ac71a13bc6ee8cfca78fc8222ef0f4f16c559a7298c8707071c95d52fc52a751297e6d9606a7eac7b8a45501a099b6c09bc74b5ecf2897667b3305
7
- data.tar.gz: ad6e1808cb90c14b1856529e2a8bb0a560bffc2a907f7c4f5167d0e75a4bf998e0c8a0f1e63eff14a78160f288836daa03b9710d08531f9bbec0dfed42db5307
6
+ metadata.gz: 6709cae7e9864fd11ce871420a4c41cf0da68e095c1d3551ea5da1c828de8982b1a5d2d5af0cf031613299e70d9fbe5978b95238869f8ec6a48c6197a84bf494
7
+ data.tar.gz: 9cb2dfa65940461f33b8bd08b537e8e74bbfa0722aad812a15d023bf26517cf066e9d1fd2ea4c340e1be12b43474d2cf22101fdec4b63d4c4761632699386b98
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.8.12 (released at 9/13/2017)
4
+
5
+ * Read oauth2_state from ticket store every time to avoid invalid oauth2_state by @xiewenwei #196
6
+
3
7
  ## v0.8.11 (released at 7/25/2017)
4
8
 
5
9
  * oauth2 state code not refresh at the same time of jsapi tickets refresh bug, many thanks @xiewenwei #192
@@ -279,7 +279,7 @@ end
279
279
 
280
280
  ## 关于接口权限
281
281
 
282
- wechat gems 内部不会检查权限。但因公众号类型不同,和微信服务器端通讯时,可能会被拒绝,详细权限控制可参考[官方文档](http://mp.weixin.qq.com/wiki/7/2d301d4b757dedc333b9a9854b457b47.html)。
282
+ wechat gems 内部不会检查权限。但因公众号类型不同,和微信服务器端通讯时,可能会被拒绝,详细权限控制可参考[官方文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433401084)。
283
283
 
284
284
  ## 使用命令行
285
285
 
data/README.md CHANGED
@@ -293,7 +293,7 @@ Notice:
293
293
 
294
294
  ## The API privilege
295
295
 
296
- wechat gems won't handle any privilege exceptions. (except token timeout, but it's not important to you as it's auto retry/recovery in gems internally), but Tencent will control a lot of privilege based on your public account type and certification, for more info please reference [official document](http://mp.weixin.qq.com/wiki/7/2d301d4b757dedc333b9a9854b457b47.html).
296
+ wechat gems won't handle any privilege exceptions. (except token timeout, but it's not important to you as it's auto retry/recovery in gems internally), but Tencent will control a lot of privilege based on your public account type and certification, for more info please reference [official document](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433401084).
297
297
 
298
298
  ## Command line mode
299
299
 
@@ -5,7 +5,7 @@ module Wechat
5
5
  class CorpJsapiTicket < JsapiBase
6
6
  def refresh
7
7
  data = client.get('get_jsapi_ticket', params: { access_token: access_token.token })
8
- @oauth2_state = data['oauth2_state'] = SecureRandom.hex(16)
8
+ data['oauth2_state'] = SecureRandom.hex(16)
9
9
  write_ticket_to_store(data)
10
10
  read_ticket_from_store
11
11
  end
@@ -24,9 +24,7 @@ module Wechat
24
24
  end
25
25
 
26
26
  def oauth2_state
27
- if @oauth2_state.blank? || remain_life_seconds < 180
28
- ticket
29
- end
27
+ ticket
30
28
  @oauth2_state
31
29
  end
32
30
 
@@ -5,7 +5,7 @@ module Wechat
5
5
  class PublicJsapiTicket < JsapiBase
6
6
  def refresh
7
7
  data = client.get('ticket/getticket', params: { access_token: access_token.token, type: 'jsapi' })
8
- @oauth2_state = data['oauth2_state'] = SecureRandom.hex(16)
8
+ data['oauth2_state'] = SecureRandom.hex(16)
9
9
  write_ticket_to_store(data)
10
10
  read_ticket_from_store
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skinnyworm
@@ -31,7 +31,7 @@ cert_chain:
31
31
  fGxGnQhzVaW07NKOCRrAZlrF8iqso4JR7Vm9bhFdzxUPLr70njwHLtDS2CHgo1VW
32
32
  1xAjN8ZXXpAmVv7V6cI9RTmQHPu/fFn+E0sG9w==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-07-25 00:00:00.000000000 Z
34
+ date: 2017-09-13 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  requirements: []
208
208
  rubyforge_project:
209
- rubygems_version: 2.6.12
209
+ rubygems_version: 2.6.13
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: DSL for wechat message handling and API
metadata.gz.sig CHANGED
Binary file