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