nicer package layout, also in checkout step 1, fixed missing registration language strings, registration error handling, email verification redirect, email verification error handling and messaging,
This commit is contained in:
29
app/Http/Middleware/NormalizeSignedUrlParameters.php
Normal file
29
app/Http/Middleware/NormalizeSignedUrlParameters.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class NormalizeSignedUrlParameters
|
||||
{
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$queryString = $request->server->get('QUERY_STRING');
|
||||
|
||||
if (is_string($queryString) && str_contains($queryString, '&')) {
|
||||
$normalized = str_replace('&', '&', $queryString);
|
||||
|
||||
if ($normalized !== $queryString) {
|
||||
$request->server->set('QUERY_STRING', $normalized);
|
||||
parse_str($normalized, $params);
|
||||
|
||||
if (is_array($params) && ! empty($params)) {
|
||||
$request->query->replace(array_merge($request->query->all(), $params));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user