(dic)
| 300 | |
| 301 | # 检测CK是否存在必备参数 |
| 302 | def 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 | # 兼容云函数 |
| 316 | def main_handler(event, context): |
no test coverage detected