MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / credentials_leave_urls

Function credentials_leave_urls

atomic-cli/src/logging/redact.rs:44–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43 #[test]
44 fn credentials_leave_urls() {
45 assert_eq!(
46 urls("Authentication failed for https://alice:s3cret@example.com/org/repo: 401"),
47 "Authentication failed for https://***@example.com/org/repo: 401"
48 );
49 assert_eq!(
50 urls("Failed to connect to remote: https://example.com/api?token=abc&x=1"),
51 "Failed to connect to remote: https://example.com/api"
52 );
53 assert_eq!(
54 urls("fetch https://tok@example.com#frag and ssh://git@host/x.git\nthen"),
55 "fetch https://***@example.com and ssh://***@host/x.git\nthen"
56 );
57 }
58
59 #[test]
60 fn malformed_urls_still_lose_their_credentials() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected