for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spinzar\SignedUrl\Middleware;
use Closure;
class ValidateSignedUrl
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
$urlIsSigned = app('signed-url')->validate($request->fullUrl());
app
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$urlIsSigned = /** @scrutinizer ignore-call */ app('signed-url')->validate($request->fullUrl());
if (!$urlIsSigned) {
abort(403);
abort
/** @scrutinizer ignore-call */
}
return $next($request);