(dic)
| 308 | |
| 309 | # 检测CK是否存在必备参数 |
| 310 | def checkHT(dic): |
| 311 | CK = dic['CK'] |
| 312 | if len(re.findall(r'source_type=.*?;',CK)) == 0: |
| 313 | notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段") |
| 314 | return False |
| 315 | if len(re.findall(r'TOKENSID=.*?;',CK)) == 0: |
| 316 | notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段") |
| 317 | return False |
| 318 | if len(re.findall(r'app_param=.*?[;]?',CK)) == 0: |
| 319 | notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段") |
| 320 | return False |
| 321 | return True |
| 322 | |
| 323 | # 兼容云函数 |
| 324 | def main_handler(event, context): |
no test coverage detected