[Web] deny api calls from sogo
This commit is contained in:
		
							parent
							
								
									237a25e6b0
								
							
						
					
					
						commit
						00d4b32a1b
					
				@ -47,6 +47,14 @@ function api_log($_data) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// deny requests from /SOGo locations
 | 
				
			||||||
 | 
					if (isset($_SERVER['HTTP_REFERER'])) {
 | 
				
			||||||
 | 
					  if (strpos(strtolower($_SERVER['HTTP_REFERER']), '/sogo') !== false) {
 | 
				
			||||||
 | 
					    header('HTTP/1.1 403 Forbidden');
 | 
				
			||||||
 | 
					    exit;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (isset($_GET['query'])) {
 | 
					if (isset($_GET['query'])) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $query = explode('/', $_GET['query']);
 | 
					  $query = explode('/', $_GET['query']);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user