diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a2aa11f98..d72030a6b 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -5,6 +5,7 @@ namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; use League\OAuth2\Server\Exception\OAuthServerException; +use Zttp\ConnectionException; class Handler extends ExceptionHandler { @@ -14,7 +15,8 @@ class Handler extends ExceptionHandler * @var array */ protected $dontReport = [ - OAuthServerException::class + OAuthServerException::class, + ConnectionException::class ]; /** diff --git a/app/Http/Controllers/DirectMessageController.php b/app/Http/Controllers/DirectMessageController.php index e01a0ef90..21bb26745 100644 --- a/app/Http/Controllers/DirectMessageController.php +++ b/app/Http/Controllers/DirectMessageController.php @@ -596,6 +596,10 @@ class DirectMessageController extends Controller $q = $request->input('q'); $r = $request->input('remote'); + if(!Str::of($q)->contains('.')) { + return []; + } + if($r && Helpers::validateUrl($q)) { Helpers::profileFetch($q); }