kopia lustrzana https://github.com/Aonrud/ila-microblog.pub
				
				
				
			Don't try to contact onion services
							rodzic
							
								
									57fc5ef913
								
							
						
					
					
						commit
						58b383ba4e
					
				|  | @ -58,6 +58,10 @@ def is_url_valid(url: str) -> bool: | ||||||
|         logger.warning(f"{parsed.hostname} is blocked") |         logger.warning(f"{parsed.hostname} is blocked") | ||||||
|         return False |         return False | ||||||
| 
 | 
 | ||||||
|  |     if parsed.hostname.endswith(".onion"): | ||||||
|  |         logger.warning(f"{url} is an onion service") | ||||||
|  |         return False | ||||||
|  | 
 | ||||||
|     ip_address = _getaddrinfo( |     ip_address = _getaddrinfo( | ||||||
|         parsed.hostname, parsed.port or (80 if parsed.scheme == "http" else 443) |         parsed.hostname, parsed.port or (80 if parsed.scheme == "http" else 443) | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Thomas Sileo
						Thomas Sileo