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

Function checkHT

ChockInEarly.py:124–135  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

122
123# 检测CK是否存在必备参数
124def checkHT(dic):
125 CK = dic['CK']
126 if len(re.findall(r'source_type=.*?;',CK)) == 0:
127 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
128 return False
129 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
130 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
131 return False
132 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
133 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
134 return False
135 return True
136
137# 兼容云函数
138def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected