You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('strips credentials with @ in password',()=>{
135
+
expect(sanitizeNetworkErrorForTelemetry(
136
+
'Failed to establish a socket connection to proxies: PROXY fictional-user:P%40ss@fictional-proxy.example.com:8080'
137
+
)).toBe(
138
+
'Failed to establish a socket connection to proxies: PROXY <credentials>@<host>:8080'
139
+
);
140
+
});
141
+
142
+
test('strips credentials with email as username',()=>{
143
+
expect(sanitizeNetworkErrorForTelemetry(
144
+
'Failed to establish a socket connection to proxies: PROXY fictional.user@example.com:fictional-pass@fictional-proxy.example.com:8080'
145
+
)).toBe(
146
+
'Failed to establish a socket connection to proxies: PROXY <credentials>@<host>:8080'
147
+
);
148
+
});
149
+
150
+
test('strips credentials with multiple @ signs',()=>{
151
+
expect(sanitizeNetworkErrorForTelemetry(
152
+
'Failed to establish a socket connection to proxies: HTTPS fictional-id:fictional-pass@fictional-realm@fictional-proxy.example.com:80'
153
+
)).toBe(
154
+
'Failed to establish a socket connection to proxies: HTTPS <credentials>@<host>:80'
155
+
);
156
+
});
157
+
118
158
test('handles multiple proxies with credentials',()=>{
119
159
expect(sanitizeNetworkErrorForTelemetry(
120
160
'Failed to establish a socket connection to proxies: PROXY testuser:testpass@proxy1.fictional.example.com:8080; PROXY proxy2.fictional.example.com:8080; DIRECT'
0 commit comments