core: better API validation for JSON fields (#15236)

* core: better API validation for JSON fields

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix web

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2025-06-25 15:05:32 +02:00
committed by GitHub
parent db1e8b291f
commit d4ca070d76
4 changed files with 171 additions and 66 deletions

View File

@ -92,7 +92,7 @@ export class EventMap extends AKElement {
// Re-add them
this.events?.results
.filter((event) => {
if (!Object.hasOwn(event.context, "geo")) {
if (!Object.hasOwn(event.context || {}, "geo")) {
return false;
}
const geo = (event as EventWithContext).context.geo;