spiegel_podman/pkg/api/handlers/compat
Valentin Rothberg d856e87f40 events endpoint: fix panic and race condition
Fix a potential panic in the events endpoint when parsing the filters
parameter.  Values of the filters map might be empty, so we need to
account for that instead of uncondtitionally accessing the first item.

Also apply a similar for race conditions as done in commit f4a2d25c0f:

	Fix a race that could cause read errors to be masked.  Masking
	such errors is likely to report red herrings since users don't
	see that reading failed for some reasons but that a given event
	could not be found.

Another race was the handler closing event channel, which could lead to
two kinds of panics: double close, send to close channel.  The backend
takes care of that.  However, make sure that the backend stops working
in case the context has been cancelled.

Fixes: #6899
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:37:05 +02:00
..
changes.go move go module to v2 2020-07-06 15:50:12 +02:00
containers.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_archive.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_attach.go Fix: Correct connection counters for hijacked connections 2020-07-09 22:17:27 +03:00
containers_create.go The compat create endpoint should 404 on no such image 2020-07-16 14:20:39 -04:00
containers_export.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_logs.go log API: add context to allow for cancelling 2020-07-09 15:13:07 +02:00
containers_pause.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_prune.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_restart.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_start.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_stats.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_stop.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_top.go move go module to v2 2020-07-06 15:50:12 +02:00
containers_unpause.go move go module to v2 2020-07-06 15:50:12 +02:00
events.go events endpoint: fix panic and race condition 2020-07-20 11:37:05 +02:00
exec.go Fix: Hijacking v2 endpoints to follow rfc 7230 semantics 2020-07-09 22:16:16 +03:00
images.go move go module to v2 2020-07-06 15:50:12 +02:00
images_build.go move go module to v2 2020-07-06 15:50:12 +02:00
images_history.go move go module to v2 2020-07-06 15:50:12 +02:00
images_push.go move go module to v2 2020-07-06 15:50:12 +02:00
images_remove.go move go module to v2 2020-07-06 15:50:12 +02:00
images_save.go Refactor handler packages 2020-03-10 08:03:41 -07:00
images_search.go move go module to v2 2020-07-06 15:50:12 +02:00
images_tag.go move go module to v2 2020-07-06 15:50:12 +02:00
info.go move go module to v2 2020-07-06 15:50:12 +02:00
networks.go move go module to v2 2020-07-06 15:50:12 +02:00
ping.go move go module to v2 2020-07-06 15:50:12 +02:00
resize.go move go module to v2 2020-07-06 15:50:12 +02:00
swagger.go move go module to v2 2020-07-06 15:50:12 +02:00
system.go move go module to v2 2020-07-06 15:50:12 +02:00
types.go V2 verify JSON output is consistent and doesn't drift 2020-05-28 16:20:29 -07:00
unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
version.go move go module to v2 2020-07-06 15:50:12 +02:00
volumes.go move go module to v2 2020-07-06 15:50:12 +02:00