mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
Mask password in log (#4129)
### What problem does this PR solve? Mask password in log ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
8dcf99611b
commit
e38e3bcc3b
@ -24,6 +24,7 @@ import time
|
|||||||
import uuid
|
import uuid
|
||||||
import requests
|
import requests
|
||||||
import logging
|
import logging
|
||||||
|
import copy
|
||||||
from enum import Enum, IntEnum
|
from enum import Enum, IntEnum
|
||||||
import importlib
|
import importlib
|
||||||
from Cryptodome.PublicKey import RSA
|
from Cryptodome.PublicKey import RSA
|
||||||
@ -65,6 +66,10 @@ CONFIGS = read_config()
|
|||||||
def show_configs():
|
def show_configs():
|
||||||
msg = f"Current configs, from {conf_realpath(SERVICE_CONF)}:"
|
msg = f"Current configs, from {conf_realpath(SERVICE_CONF)}:"
|
||||||
for k, v in CONFIGS.items():
|
for k, v in CONFIGS.items():
|
||||||
|
if isinstance(v, dict):
|
||||||
|
if "password" in v:
|
||||||
|
v = copy.deepcopy(v)
|
||||||
|
v["password"] = "*" * 8
|
||||||
msg += f"\n\t{k}: {v}"
|
msg += f"\n\t{k}: {v}"
|
||||||
logging.info(msg)
|
logging.info(msg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user