Skip to content

Commit f6bca12

Browse files
committed
improve
1 parent 78dca9c commit f6bca12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry-core/src/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub fn is_sensitive_header(name: &str) -> bool {
2020

2121
/// Scrub PII (username and password) from the given URL.
2222
pub fn scrub_pii_from_url(mut url: url::Url) -> url::Url {
23+
// the set calls will fail and return an error if the URL is relative
24+
// in those cases, just ignore the errors
2325
if !url.username().is_empty() {
2426
let _ = url.set_username(PII_REPLACEMENT);
2527
}

0 commit comments

Comments
 (0)