Skip to content

Commit

Permalink
Merge pull request #433 from FineFindus/fix/blocks
Browse files Browse the repository at this point in the history
fix: block domains in block list
  • Loading branch information
LucasGGamerM authored Jun 21, 2024
2 parents 998e186 + 76030c0 commit f8dbecc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ public <T> void submitRequest(final MastodonAPIRequest<T> req){
final boolean isBad = host == null || badDomains.stream().anyMatch(h -> h.equalsIgnoreCase(host) || host.toLowerCase().endsWith("." + h));
thread.postRunnable(()->{
try{
// if (isBad) throw new IllegalArgumentException();
if(isBad){
Log.i(TAG, "submitRequest: refusing to connect to bad domain: " + host);
throw new IllegalArgumentException("Failed to connect to domain");
}

if(req.canceled)
return;
Request.Builder builder=new Request.Builder()
Expand Down

0 comments on commit f8dbecc

Please sign in to comment.