From 4d404b887fd56caecb7cec00191437e661ea4692 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Fri, 30 Sep 2022 14:41:25 +0300 Subject: [PATCH] Pull request: 4970-error-415 Updates #4970. Squashed commit of the following: commit 10365d9c8474e9d9735f581fb32b2892b2153cc4 Author: Ainar Garipov Date: Fri Sep 30 14:23:06 2022 +0300 all: imp docs, names commit cff1103a0618a6430dc91e7e018febbf313c12ba Author: Ainar Garipov Date: Fri Sep 30 14:02:38 2022 +0300 home: imp content-type check --- CHANGELOG.md | 17 +++++++- client/src/api/Api.js | 36 ++++------------- internal/aghhttp/aghhttp.go | 2 +- internal/aghhttp/header.go | 2 +- internal/home/control.go | 80 ++++++++++++++++++++++++++----------- openapi/CHANGELOG.md | 25 ++++++++++++ openapi/openapi.yaml | 20 ++++++++-- 7 files changed, 122 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 492ba690..8e8ab361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,19 @@ and this project adheres to ## [v0.108.0] - TBA (APPROX.) --> +### Security + +- As an additional CSRF protection measure, AdGuard Home now ensures that + requests that change its state but have no body (such as `POST + /control/stats_reset` requests) do not have a `Content-Type` header set on + them ([#4970]). + +### Fixed + +- `only application/json is allowed` errors in various APIs ([#4970]). + +[#4970]: https://github.com/AdguardTeam/AdGuardHome/issues/4970 +