mirror of
				https://github.com/1Password/onepassword-operator.git
				synced 2025-10-31 11:49:40 +00:00 
			
		
		
		
	 dae6e51112
			
		
	
	dae6e51112
	
	
	
		
			
			Items can now be accessed by either vaults/<vault_id>/items/<item_id> or vaults/<vault_title>/items/<item_title>
		
			
				
	
	
		
			21 lines
		
	
	
		
			395 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			395 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package onepassword
 | |
| 
 | |
| // UUIDLength defines the required length of UUIDs
 | |
| const UUIDLength = 26
 | |
| 
 | |
| // IsValidClientUUID returns true if the given client uuid is valid.
 | |
| func IsValidClientUUID(uuid string) bool {
 | |
| 	if len(uuid) != UUIDLength {
 | |
| 		return false
 | |
| 	}
 | |
| 
 | |
| 	for _, c := range uuid {
 | |
| 		valid := (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')
 | |
| 		if !valid {
 | |
| 			return false
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	return true
 | |
| }
 |