File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . IO ;
4
4
using System . Text ;
5
+ using System . Text . RegularExpressions ;
5
6
using System . Threading ;
6
7
using System . Threading . Tasks ;
7
8
@@ -263,11 +264,13 @@ private async Task WriteAsyncInternal_Standard(string str)
263
264
{
264
265
await semaphoreSlim_Standard . WaitAsync ( ) ;
265
266
267
+ string sanitized = Regex . Replace ( str , @"\\Users\\[^\\]+\\" , "<redacted>" ) ;
268
+
266
269
try
267
270
{
268
- await outputFile_Standard . WriteLineAsync ( str ) ;
271
+ await outputFile_Standard . WriteLineAsync ( sanitized ) ;
269
272
await outputFile_Standard . FlushAsync ( ) ;
270
- System . Diagnostics . Debug . WriteLine ( str ) ;
273
+ System . Diagnostics . Debug . WriteLine ( sanitized ) ;
271
274
}
272
275
finally
273
276
{
@@ -286,11 +289,13 @@ private async Task WriteAsyncInternal_Error(string str)
286
289
287
290
await semaphoreSlim_Error . WaitAsync ( ) ;
288
291
292
+ string sanitized = Regex . Replace ( str , @"\\Users\\[^\\]+\\" , "<redacted>" ) ;
293
+
289
294
try
290
295
{
291
- await outputFile_Error . WriteLineAsync ( str ) ;
296
+ await outputFile_Error . WriteLineAsync ( sanitized ) ;
292
297
await outputFile_Error . FlushAsync ( ) ;
293
- System . Diagnostics . Debug . WriteLine ( str ) ;
298
+ System . Diagnostics . Debug . WriteLine ( sanitized ) ;
294
299
}
295
300
finally
296
301
{
You can’t perform that action at this time.
0 commit comments