mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 09:42:26 -05:00 
			
		
		
		
	[chore] Validate/set account domain (#619)
* add miekg/dns dependency * set/validate accountDomain
This commit is contained in:
		
					parent
					
						
							
								dfdc473cef
							
						
					
				
			
			
				commit
				
					
						cf5c6d724d
					
				
			
		
					 304 changed files with 34218 additions and 1 deletions
				
			
		
							
								
								
									
										32
									
								
								vendor/github.com/miekg/dns/fuzz.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								vendor/github.com/miekg/dns/fuzz.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | |||
| // +build fuzz | ||||
| 
 | ||||
| package dns | ||||
| 
 | ||||
| import "strings" | ||||
| 
 | ||||
| func Fuzz(data []byte) int { | ||||
| 	msg := new(Msg) | ||||
| 
 | ||||
| 	if err := msg.Unpack(data); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	if _, err := msg.Pack(); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 
 | ||||
| 	return 1 | ||||
| } | ||||
| 
 | ||||
| func FuzzNewRR(data []byte) int { | ||||
| 	str := string(data) | ||||
| 	// Do not fuzz lines that include the $INCLUDE keyword and hint the fuzzer | ||||
| 	// at avoiding them. | ||||
| 	// See GH#1025 for context. | ||||
| 	if strings.Contains(strings.ToUpper(str), "$INCLUDE") { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if _, err := NewRR(str); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	return 1 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue