(dic)
| 227 | |
| 228 | # 检测CK是否存在必备参数 |
| 229 | def checkHT(dic): |
| 230 | CK = dic['CK'] |
| 231 | if len(re.findall(r'source_type=.*?;',CK)) == 0: |
| 232 | notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段") |
| 233 | return False |
| 234 | if len(re.findall(r'TOKENSID=.*?;',CK)) == 0: |
| 235 | notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段") |
| 236 | return False |
| 237 | if len(re.findall(r'app_param=.*?[;]?',CK)) == 0: |
| 238 | notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段") |
| 239 | return False |
| 240 | return True |
| 241 | |
| 242 | # 兼容云函数 |
| 243 | def main_handler(event, context): |
no test coverage detected