| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -8,6 +8,7 @@ const { escapeRegExp } = require('lodash');
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const APP_ROOT_PATH = path.join(__dirname, '..', '..', '..');
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const SESSION_ID_PATTERN = /\b(05[0-9a-f]{64})\b/gi;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const SNODE_PATTERN = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const GROUP_ID_PATTERN = /(group\()([^)]+)(\))/g;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const REDACTION_PLACEHOLDER = '[REDACTED]';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -64,6 +65,14 @@ exports.redactSessionID = text => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  return text.replace(SESSION_ID_PATTERN, REDACTION_PLACEHOLDER);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				exports.redactSnodeIP = text => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  if (!is.string(text)) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    throw new TypeError("'text' must be a string");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  return text.replace(SNODE_PATTERN, REDACTION_PLACEHOLDER);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				//      redactGroupIds :: String -> String
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				exports.redactGroupIds = text => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  if (!is.string(text)) {
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -84,7 +93,8 @@ exports.redactSensitivePaths = exports._redactPath(APP_ROOT_PATH);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				exports.redactAll = compose(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  exports.redactSensitivePaths,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  exports.redactGroupIds,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  exports.redactSessionID
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  exports.redactSessionID,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  exports.redactSnodeIP
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const removeNewlines = text => text.replace(/\r?\n|\r/g, '');
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |