replace the secret field from obfuscated to full-masked value (#24800)

Co-authored-by: charles liu <dearcharles.liu@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Charles Liu
2025-09-02 03:19:20 +02:00
committed by GitHub
parent 899bcf0be4
commit 4e7bcb3e5a
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -11,6 +11,10 @@ def obfuscated_token(token: str) -> str:
return token[:6] + "*" * 12 + token[-2:]
def full_mask_token(token_length=20):
return "*" * token_length
def encrypt_token(tenant_id: str, token: str):
from models.account import Tenant
from models.engine import db
+1 -1
View File
@@ -17,7 +17,7 @@ class EnvironmentVariableField(fields.Raw):
return {
"id": value.id,
"name": value.name,
"value": encrypter.obfuscated_token(value.value),
"value": encrypter.full_mask_token(),
"value_type": value.value_type.value,
"description": value.description,
}