more data checking, cleans up some infrequent php errors
This commit is contained in:
		
					parent
					
						
							
								7c6bc5a93d
							
						
					
				
			
			
				commit
				
					
						79f3bbbf2b
					
				
			
		
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -188,6 +188,13 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false)
 | 
			
		|||
 | 
			
		||||
	logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
 | 
			
		||||
 | 
			
		||||
	// without a public key nothing will work
 | 
			
		||||
 | 
			
		||||
	if(! $pubkey) {
 | 
			
		||||
		logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['id']);
 | 
			
		||||
		return '';
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$inner_aes_key = random_string(32);
 | 
			
		||||
	$b_inner_aes_key = base64_encode($inner_aes_key);
 | 
			
		||||
	$inner_iv = random_string(16);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue