(dic)
| 241 | |
| 242 | # 检测CK是否存在必备参数 |
| 243 | def checkHT(dic): |
| 244 | CK = dic['CK'] |
| 245 | if len(re.findall(r'source_type=.*?;',CK)) == 0: |
| 246 | notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段") |
| 247 | return False |
| 248 | if len(re.findall(r'TOKENSID=.*?;',CK)) == 0: |
| 249 | notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段") |
| 250 | return False |
| 251 | if len(re.findall(r'app_param=.*?[;]?',CK)) == 0: |
| 252 | notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段") |
| 253 | return False |
| 254 | return True |
| 255 | |
| 256 | # 兼容云函数 |
| 257 | def main_handler(event, context): |
no test coverage detected