Skip to main content

redact_auth_body

Function redact_auth_body 

Source
pub fn redact_auth_body(body: &str) -> String
Expand description

v1.4.84 SEC-001: 给一段 JSON-like / key=value text 做 redaction.

支持两种格式:

  1. JSON body: {"tgtgt":"abc","account":"xxx"} → credential redaction plus an acc-* identity fingerprint.
  2. URL-encoded form: tgtgt=abc&account=xxx → credential redaction plus an acc-* identity fingerprint.
  3. 自由格式 (key=value 空格分隔): salt=abc svr_time=123salt=<REDACTED len=3> svr_time=123

Login identity fields are fingerprinted; non-identity context remains.