Fix RotateFileVaultKey panics (#801)

* added test case for RotateFileVaultKey marshalling panics
* update plist library (fixes panics in RotateFileVaultKey command)
This commit is contained in:
Kory Prince
2022-03-03 15:42:45 -06:00
committed by GitHub
parent 7a6fff3bdc
commit 1f44de09b5
3 changed files with 14 additions and 1 deletions

2
go.mod
View File

@@ -9,7 +9,7 @@ require (
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.6.2
github.com/groob/finalizer v0.0.0-20170707115354-4c2ed49aabda
github.com/groob/plist v0.0.0-20180203051248-dd56909aee38
github.com/groob/plist v0.0.0-20220217120414-63fa881b19a5
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0
github.com/kolide/kit v0.0.0-20180912215818-0c28f72eb2b0
github.com/lib/pq v1.0.0

2
go.sum
View File

@@ -38,6 +38,8 @@ github.com/groob/finalizer v0.0.0-20170707115354-4c2ed49aabda h1:5ikpG9mYCMFiZX0
github.com/groob/finalizer v0.0.0-20170707115354-4c2ed49aabda/go.mod h1:MyndkAZd5rUMdNogn35MWXBX1UiBigrU8eTj8DoAC2c=
github.com/groob/plist v0.0.0-20180203051248-dd56909aee38 h1:afbUddvIjPRC7XHHgeSTRfzZtIxEsSl4VCxumLBGDJU=
github.com/groob/plist v0.0.0-20180203051248-dd56909aee38/go.mod h1:qg2Nek0ND/hIr+nY8H1oVqEW2cLzVVNaAQ0QexOyjyc=
github.com/groob/plist v0.0.0-20220217120414-63fa881b19a5 h1:saaSiB25B1wgaxrshQhurfPKUGJ4It3OxNJUy0rdOjU=
github.com/groob/plist v0.0.0-20220217120414-63fa881b19a5/go.mod h1:itkABA+w2cw7x5nYUS/pLRef6ludkZKOigbROmCTaFw=
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0 h1:5B0uxl2lzNRVkJVg+uGHxWtRt4C0Wjc6kJKo5XYx8xE=
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU=
github.com/kolide/kit v0.0.0-20180912215818-0c28f72eb2b0 h1:8UB0NJBoB/lN2O9zG9+U2klyYE0UhvN2Zrn7HBjhwNY=

View File

@@ -127,6 +127,17 @@ func TestMarshalCommand(t *testing.T) {
},
},
},
{
Command: Command{
RequestType: "RotateFileVaultKey",
RotateFileVaultKey: &RotateFileVaultKey{
KeyType: "personal",
FileVaultUnlock: FileVaultUnlock{
Password: "password",
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.Command.RequestType+"_json", func(t *testing.T) {