mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update DirectMessageController, disable exception logging for invalid urls. Fixes #2752
This commit is contained in:
parent
69567e19df
commit
2d0a253e07
2 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ namespace App\Exceptions;
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||||
|
use Zttp\ConnectionException;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
|
@ -14,7 +15,8 @@ class Handler extends ExceptionHandler
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
OAuthServerException::class
|
OAuthServerException::class,
|
||||||
|
ConnectionException::class
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -596,6 +596,10 @@ class DirectMessageController extends Controller
|
||||||
$q = $request->input('q');
|
$q = $request->input('q');
|
||||||
$r = $request->input('remote');
|
$r = $request->input('remote');
|
||||||
|
|
||||||
|
if(!Str::of($q)->contains('.')) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
if($r && Helpers::validateUrl($q)) {
|
if($r && Helpers::validateUrl($q)) {
|
||||||
Helpers::profileFetch($q);
|
Helpers::profileFetch($q);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue