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

Function checkHT

Backup/otherTask.py:208–219  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

206
207# 检测CK是否存在必备参数
208def checkHT(dic):
209 CK = dic['CK']
210 if len(re.findall(r'source_type=.*?;',CK)) == 0:
211 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
212 return False
213 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
214 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
215 return False
216 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
217 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
218 return False
219 return True
220
221# 兼容云函数
222def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected