(dic)
| 149 | |
| 150 | # 检测CK是否存在必备参数 |
| 151 | def checkHT(dic): |
| 152 | CK = dic['CK'] |
| 153 | if len(re.findall(r'source_type=.*?;',CK)) == 0: |
| 154 | notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段") |
| 155 | return False |
| 156 | if len(re.findall(r'TOKENSID=.*?;',CK)) == 0: |
| 157 | notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段") |
| 158 | return False |
| 159 | if len(re.findall(r'app_param=.*?[;]?',CK)) == 0: |
| 160 | notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段") |
| 161 | return False |
| 162 | return True |
| 163 | |
| 164 | # 兼容云函数 |
| 165 | def main_handler(event, context): |
no test coverage detected