public boolean shouldOverrideUrlLoading(WebView view, String url) {
	{
		Uri uri = Uri.parse(url);
		// BAD: partial domain match, which allows an attacker to register a domain like myexample.com to circumvent the verification
		if (uri.getHost() != null && uri.getHost().endsWith("example.com")) {
			return false;
		}
	}

	{
		Uri uri = Uri.parse(url);
		// GOOD: full domain match
		if (uri.getHost() != null && uri.getHost().endsWith(".example.com")) {
			return false;
		}
	}
}
@@ -61,21 +61,30 @@
  url) %7B%0A
-%09%7B%0A%09%09
+    %7B%0A        
 Uri uri 
@@ -101,18 +101,24 @@
 e(url);%0A
-%09%09
+        
 // BAD: 
@@ -235,18 +235,24 @@
 ication%0A
-%09%09
+        
 if (uri.
@@ -305,35 +305,44 @@
 xample.com%22)) %7B%0A
-%09%09%09
+            
 return false;%0A%09%09
@@ -343,21 +343,39 @@
 se;%0A
-%09%09%7D%0A%09%7D%0A%0A%09%7B%0A%09%09
+        %7D%0A    %7D%0A%0A    %7B%0A        
 Uri 
@@ -396,18 +396,24 @@
 e(url);%0A
-%09%09
+        
 // GOOD:
@@ -431,18 +431,24 @@
 n match%0A
-%09%09
+        
 if (uri.
@@ -514,11 +514,20 @@
 ) %7B%0A
-%09%09%09
+            
 retu
@@ -540,12 +540,22 @@
 se;%0A
-%09%09%7D%0A%09
+        %7D%0A    
 %7D%0A%7D
+%0A

Address improper URL authorization