mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762) (GH-22773)
(cherry picked from commit 93a1ccabde)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
			
			
This commit is contained in:
		
							parent
							
								
									479553c7c1
								
							
						
					
					
						commit
						aa7b03b31b
					
				
					 3 changed files with 18 additions and 0 deletions
				
			
		|  | @ -2596,6 +2596,11 @@ def ip2num(ipAddr): | |||
|                 mask = 8 * (m.group(1).count('.') + 1) | ||||
|             else: | ||||
|                 mask = int(mask[1:]) | ||||
| 
 | ||||
|             if mask < 0 or mask > 32: | ||||
|                 # System libraries ignore invalid prefix lengths | ||||
|                 continue | ||||
| 
 | ||||
|             mask = 32 - mask | ||||
| 
 | ||||
|             if (hostIP >> mask) == (base >> mask): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Skeleton (bot)
						Miss Skeleton (bot)