mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix/254 empty post validate json 16
This commit is contained in:
parent
21bced8764
commit
14a1df8bcd
2 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ v1.6
|
|||
- Fix GH-15 Add password import from CSV
|
||||
- Fix FLEXIAPI-242 Add stricter validation for the AccountCreationToken Push Notification endpoint
|
||||
- Fix FLEXIAPI-252 Update the hCaptcha Laravel library, use file instead of cookies to store the session to prevent empty errors bags
|
||||
- Fix FLEXIAPI-254 Allow no data on POST requests to not trigger the ValidateJSON middleware
|
||||
|
||||
v1.5
|
||||
---
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class ValidateJSON
|
|||
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if ($request->expectsJson()) {
|
||||
if ($request->expectsJson() && !empty($request->getContent())) {
|
||||
json_decode($request->getContent());
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
abort(400, self::$message . ': ' . json_last_error_msg());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue