Parcourir la source

feat: verify server when receive message in wechatmp

master
lanvent il y a 1 an
Parent
révision
b5df6faadf
2 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. +1
    -0
      channel/wechatmp/active_reply.py
  2. +1
    -0
      channel/wechatmp/passive_reply.py

+ 1
- 0
channel/wechatmp/active_reply.py Voir le fichier

@@ -21,6 +21,7 @@ class Query:
# 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)


+ 1
- 0
channel/wechatmp/passive_reply.py Voir le fichier

@@ -20,6 +20,7 @@ class Query:

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


Chargement…
Annuler
Enregistrer