Commit 2701bb2b authored by renovate's avatar renovate
Browse files

Update module github.com/ProtonMail/gopenpgp/v2 to v2.4.6

parent 74f2a835
Pipeline #30597 failed with stages
in 2 minutes and 17 seconds
......@@ -8,7 +8,7 @@ require (
git.autistici.org/id/auth v0.0.0-20211206094959-05544c3c95bb
git.autistici.org/id/go-sso v0.0.0-20210117165919-e56e6579953d
git.autistici.org/id/usermetadb v0.0.0-20210507085300-ad16aa223703
github.com/ProtonMail/gopenpgp/v2 v2.4.5
github.com/ProtonMail/gopenpgp/v2 v2.4.6
github.com/go-ldap/ldap/v3 v3.4.2
github.com/go-test/deep v1.0.7
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
......
......@@ -377,7 +377,7 @@ func (ptc *PlainTextCollector) Accept(partReader io.Reader, header textproto.MIM
buffer, err = DecodeCharset(buffer, mediaType, params)
if err != nil {
log.Warnln("Decode charset error:", err)
return err
err = nil // Don't fail parsing on decoding errors, use original
}
ptc.plainTextContents.Write(buffer)
}
......@@ -432,7 +432,7 @@ func (bc *BodyCollector) Accept(partReader io.Reader, header textproto.MIMEHeade
buffer, err = DecodeCharset(buffer, mediaType, params)
if err != nil {
log.Warnln("Decode charset error:", err)
return err
err = nil // Don't fail parsing on decoding errors, use original
}
if mediaType == "text/html" {
bc.hasHtml = true
......@@ -501,7 +501,7 @@ func (ac *AttachmentsCollector) Accept(partReader io.Reader, header textproto.MI
buffer, err = DecodeCharset(buffer, mediaType, params)
if err != nil {
log.Warnln("Decode charset error:", err)
return err
err = nil // Don't fail parsing on decoding errors, use original
}
headerBuf := new(bytes.Buffer)
http.Header(header).Write(headerBuf)
......
......@@ -3,7 +3,7 @@ package constants
// Constants for armored data.
const (
ArmorHeaderVersion = "GopenPGP 2.4.5"
ArmorHeaderVersion = "GopenPGP 2.4.6"
ArmorHeaderComment = "https://gopenpgp.org"
PGPMessageHeader = "PGP MESSAGE"
PGPSignatureHeader = "PGP SIGNATURE"
......
package constants
const Version = "2.4.5"
const Version = "2.4.6"
......@@ -8,6 +8,7 @@ import (
"net/textproto"
pgpErrors "github.com/ProtonMail/go-crypto/openpgp/errors"
"github.com/ProtonMail/gopenpgp/v2/internal"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/packet"
......@@ -98,7 +99,8 @@ func (sc *SignatureCollector) Accept(
}
sc.signature = string(buffer)
str, _ := ioutil.ReadAll(rawBody)
rawBody = bytes.NewReader(str)
canonicalizedBody := internal.CanonicalizeAndTrim(string(str))
rawBody = bytes.NewReader([]byte(canonicalizedBody))
if sc.keyring != nil {
_, err = openpgp.CheckArmoredDetachedSignature(sc.keyring, rawBody, bytes.NewReader(buffer), sc.config)
......
......@@ -52,9 +52,9 @@ github.com/ProtonMail/go-crypto/openpgp/internal/ecc
github.com/ProtonMail/go-crypto/openpgp/internal/encoding
github.com/ProtonMail/go-crypto/openpgp/packet
github.com/ProtonMail/go-crypto/openpgp/s2k
# github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a
# github.com/ProtonMail/go-mime v0.0.0-20220302105931-303f85f7fe0f
github.com/ProtonMail/go-mime
# github.com/ProtonMail/gopenpgp/v2 v2.4.5
# github.com/ProtonMail/gopenpgp/v2 v2.4.6
## explicit
github.com/ProtonMail/gopenpgp/v2/armor
github.com/ProtonMail/gopenpgp/v2/constants
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment