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