mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-12-03 02:37:06 +03:00
send notice ids in the request body (#25142)
Notice ids went into the URL path, and nginx decodes the path, merges slashes, and resolves dot segments before proxying. A detector named zmq:tcp://host:5555 came through as tcp:/host, so its notice 404'd and couldn't be acknowledged or muted. The same happened to failed_login notices for usernames containing // or /../. Acknowledge, mute, and unhide now take the id in a JSON body at /notices/acknowledge, /notices/mute, and /notices/unhide.
This commit is contained in:
Vendored
+34
-28
@@ -4346,7 +4346,7 @@ paths:
|
||||
security:
|
||||
- frigateAdminAuth: []
|
||||
x-required-role: admin
|
||||
/notices/{notice_id}/acknowledge:
|
||||
/notices/acknowledge:
|
||||
post:
|
||||
tags:
|
||||
- Notices
|
||||
@@ -4358,14 +4358,13 @@ paths:
|
||||
|
||||
Config and stream check rows and the update notice never repeat, so they
|
||||
can only be muted.
|
||||
operationId: acknowledge_notice_notices__notice_id__acknowledge_post
|
||||
parameters:
|
||||
- name: notice_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
title: Notice Id
|
||||
operationId: acknowledge_notice_notices_acknowledge_post
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NoticeIdBody'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
@@ -4381,7 +4380,7 @@ paths:
|
||||
security:
|
||||
- frigateAdminAuth: []
|
||||
x-required-role: admin
|
||||
/notices/{notice_id}/mute:
|
||||
/notices/mute:
|
||||
post:
|
||||
tags:
|
||||
- Notices
|
||||
@@ -4390,14 +4389,13 @@ paths:
|
||||
**Access:** Admin role required.
|
||||
|
||||
Hide a notice or a config or stream check row for good.
|
||||
operationId: mute_notice_notices__notice_id__mute_post
|
||||
parameters:
|
||||
- name: notice_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
title: Notice Id
|
||||
operationId: mute_notice_notices_mute_post
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NoticeIdBody'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
@@ -4413,8 +4411,8 @@ paths:
|
||||
security:
|
||||
- frigateAdminAuth: []
|
||||
x-required-role: admin
|
||||
/notices/{notice_id}/hidden:
|
||||
delete:
|
||||
/notices/unhide:
|
||||
post:
|
||||
tags:
|
||||
- Notices
|
||||
summary: Unhide Notice
|
||||
@@ -4422,14 +4420,13 @@ paths:
|
||||
**Access:** Admin role required.
|
||||
|
||||
Show an acknowledged or muted notice or check row again.
|
||||
operationId: unhide_notice_notices__notice_id__hidden_delete
|
||||
parameters:
|
||||
- name: notice_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
title: Notice Id
|
||||
operationId: unhide_notice_notices_unhide_post
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NoticeIdBody'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
@@ -9324,6 +9321,15 @@ components:
|
||||
- status
|
||||
title: MotionSearchStatusResponse
|
||||
description: Response containing job status and results.
|
||||
NoticeIdBody:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: Notice or check row id
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
title: NoticeIdBody
|
||||
PlaybackSourceEnum:
|
||||
type: string
|
||||
enum:
|
||||
|
||||
Reference in New Issue
Block a user