From 4bc2ed39736f71f8b3918b72c02beb3eb38b8cbd Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 28 Apr 2022 22:28:58 +0530 Subject: [PATCH] Bump GoSAML dependency (#20092) ```release-note NONE ``` --- go.mod | 2 +- go.sum | 4 ++-- .../github.com/mattermost/gosaml2/types/encrypted_key.go | 9 ++++++++- vendor/modules.txt | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 74d5acad76..199ea6f824 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 github.com/lib/pq v1.10.4 github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 - github.com/mattermost/gosaml2 v0.8.0 + github.com/mattermost/gosaml2 v0.8.1-0.20220428161029-8c99721fdec4 github.com/mattermost/gziphandler v0.0.1 github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d github.com/mattermost/logr/v2 v2.0.15 diff --git a/go.sum b/go.sum index cb441e3aaf..f372fe2c83 100644 --- a/go.sum +++ b/go.sum @@ -921,8 +921,8 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 h1:Khvh6waxG1cHc4Cz5ef9n3XVCxRWpAKUtqg9PJl5+y8= github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404/go.mod h1:RyS7FDNQlzF1PsjbJWHRI35exqaKGSO9qD4iv8QjE34= -github.com/mattermost/gosaml2 v0.8.0 h1:nkYiByawqwJ7KncK1LDWKwTx5aRarBTQsmH+XcCVsWQ= -github.com/mattermost/gosaml2 v0.8.0/go.mod h1:1nMAdE2Psxaz+pj79Oytayi+hC3aZUi3SmJQlIe+sLM= +github.com/mattermost/gosaml2 v0.8.1-0.20220428161029-8c99721fdec4 h1:y102PXr0vul3Dcw1xP4fs6R3lFL2kyLsC3qI6lsgCVQ= +github.com/mattermost/gosaml2 v0.8.1-0.20220428161029-8c99721fdec4/go.mod h1:1nMAdE2Psxaz+pj79Oytayi+hC3aZUi3SmJQlIe+sLM= github.com/mattermost/gziphandler v0.0.1 h1:uXHcXF5agnQ6bXabvpiwwwZOlCYoa7mKHH0lxns/o8w= github.com/mattermost/gziphandler v0.0.1/go.mod h1:CvvZR7sXqhj81V2swXuQY7T04Ccc89u7W7pHNPKev8g= github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d h1:/RJ/UV7M5c7L2TQ0KNm4yZxxFvC1nvRz/gY/Daa35aI= diff --git a/vendor/github.com/mattermost/gosaml2/types/encrypted_key.go b/vendor/github.com/mattermost/gosaml2/types/encrypted_key.go index a33b96de4d..b934257466 100644 --- a/vendor/github.com/mattermost/gosaml2/types/encrypted_key.go +++ b/vendor/github.com/mattermost/gosaml2/types/encrypted_key.go @@ -18,6 +18,7 @@ import ( "bytes" "crypto/aes" "crypto/cipher" + "crypto/des" "crypto/rand" "crypto/rsa" "crypto/sha1" @@ -173,11 +174,17 @@ func (ek *EncryptedKey) DecryptSymmetricKey(cert *tls.Certificate) (cipher.Block //The RSA v1.5 Key Transport algorithm given below are those used in conjunction with TRIPLEDES //Please also see https://www.w3.org/TR/xmlenc-core/#sec-Algorithms and //https://www.w3.org/TR/xmlenc-core/#rsav15note. - b, err := aes.NewCipher(pt) + b, err := des.NewTripleDESCipher(pt) if err != nil { return nil, err } + // FIXME: The version we had previously in our fork, AES seems more secure from my Googling. + // b, err := aes.NewCipher(pt) + // if err != nil { + // return nil, err + // } + return b, nil default: return nil, fmt.Errorf("unsupported encryption algorithm: %s", ek.EncryptionMethod.Algorithm) diff --git a/vendor/modules.txt b/vendor/modules.txt index 172a47ca5f..f72152e5ea 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -433,7 +433,7 @@ github.com/mattermost/go-i18n/i18n github.com/mattermost/go-i18n/i18n/bundle github.com/mattermost/go-i18n/i18n/language github.com/mattermost/go-i18n/i18n/translation -# github.com/mattermost/gosaml2 v0.8.0 +# github.com/mattermost/gosaml2 v0.8.1-0.20220428161029-8c99721fdec4 ## explicit; go 1.13 github.com/mattermost/gosaml2 github.com/mattermost/gosaml2/types