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

Function checkHT

TaskCenter.py:414–425  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

412
413# 检测CK是否存在必备参数
414def checkHT(dic):
415 CK = dic['CK']
416 if len(re.findall(r'source_type=.*?;',CK)) == 0:
417 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
418 return False
419 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
420 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
421 return False
422 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
423 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
424 return False
425 return True
426
427# 兼容云函数
428def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected