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