OreosLab / checkinpanel

Use of a method on dictionary's get method detected PTC-W0031
Bug risk
Major
a year ago2 years old
Use of a method detected on the return value of push_config.get('PUSH_KEY')
337    print("serverJ 服务启动")
338
339    data = {"text": title, "desp": content.replace("\n", "\n\n")}
340    if push_config.get("PUSH_KEY").index("SCT") != -1:341        url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send'
342    else:
343        url = f'https://sc.ftqq.com/${push_config.get("PUSH_KEY")}.send'
Use of a method detected on the return value of push_config.get('DD_BOT_SECRET')
157    print("钉钉机器人 服务启动")
158
159    timestamp = str(round(time.time() * 1000))
160    secret_enc = push_config.get("DD_BOT_SECRET").encode("utf-8")161    string_to_sign = f'{timestamp}\n{push_config.get("DD_BOT_SECRET")}'
162    string_to_sign_enc = string_to_sign.encode("utf-8")
163    hmac_code = hmac.new(
Use of a method detected on the return value of push_config.get('BARK_PUSH')
 97
 98    if push_config.get("BARK_PUSH").startswith("http"):
 99        url = (
100            f'{push_config.get("BARK_PUSH").rstrip("/")}/'101            f"{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}"
102        )
103    else:
Use of a method detected on the return value of push_config.get('BARK_PUSH')
 95        return
 96    print("bark 服务启动")
 97
 98    if push_config.get("BARK_PUSH").startswith("http"): 99        url = (
100            f'{push_config.get("BARK_PUSH").rstrip("/")}/'
101            f"{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}"
Use of a method detected on the return value of push_config.get('BARK_PUSH')
126
127    if push_config.get("BARK_PUSH").startswith("http"):
128        url = (
129            f'{push_config.get("BARK_PUSH").rstrip("/")}/'130            f"{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}"
131        )
132    else: