MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / checkHT

Function checkHT

Double11.py:302–313  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

300
301# 检测CK是否存在必备参数
302def checkHT(dic):
303 CK = dic['CK']
304 if len(re.findall(r'source_type=.*?;',CK)) == 0:
305 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
306 return False
307 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
308 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
309 return False
310 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
311 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
312 return False
313 return True
314
315# 兼容云函数
316def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected