Skip to content

Commit

Permalink
feat: verify server when receive message in wechatmp
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Apr 21, 2023
1 parent 7cefe2d commit b5df6fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions channel/wechatmp/active_reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def POST(self):
# Make sure to return the instance that first created, @singleton will do that.
channel = WechatMPChannel()
try:
verify_server(web.input())
message = web.data() # todo crypto
# logger.debug("[wechatmp] Receive request:\n" + webData.decode("utf-8"))
msg = parse_message(message)
Expand Down
1 change: 1 addition & 0 deletions channel/wechatmp/passive_reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def GET(self):

def POST(self):
try:
verify_server(web.input())
request_time = time.time()
channel = WechatMPChannel()
message = web.data() # todo crypto
Expand Down

0 comments on commit b5df6fa

Please sign in to comment.