pkg/authorization
Liron Levin b3ff922a7b Fix #20508 - Authz plugin enabled with large text/JSON POST payload corrupts body
Based on the discussion, we have changed the following:

1. Send body only if content-type is application/json (based on the
Docker official daemon REST specification, this is the provided for all
APIs that requires authorization.

2. Correctly verify that the msg body is smaller than max cap (this was
the actual bug). Fix includes UT.

3. Minor: Check content length > 0 (it was -1 for load, altough an
attacker can still modify this)

Signed-off-by: Liron Levin <liron@twistlock.com>
2016-02-25 08:11:55 +02:00
..
api.go pkg: authorization: add Err to tweak response status code 2015-12-17 11:08:47 +01:00
authz.go Fix #20508 - Authz plugin enabled with large text/JSON POST payload corrupts body 2016-02-25 08:11:55 +02:00
authz_unix_test.go Fix #20508 - Authz plugin enabled with large text/JSON POST payload corrupts body 2016-02-25 08:11:55 +02:00
plugin.go pkg: authorization: do not register the same plugin 2015-12-23 21:08:40 +01:00
response.go Fix 19575: Docker events doesn't work with authorization plugin 2016-02-05 22:30:01 +02:00