forked from Silverfish/proton-bridge
GODT-1816: Fix variable case conflict
This commit is contained in:
@ -5,13 +5,14 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/ProtonMail/proton-bridge/v2/internal/logging"
|
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/ProtonMail/proton-bridge/v2/internal/logging"
|
||||||
|
|
||||||
"github.com/Masterminds/semver/v3"
|
"github.com/Masterminds/semver/v3"
|
||||||
"github.com/ProtonMail/gluon"
|
"github.com/ProtonMail/gluon"
|
||||||
imapEvents "github.com/ProtonMail/gluon/events"
|
imapEvents "github.com/ProtonMail/gluon/events"
|
||||||
@ -113,11 +114,11 @@ func getGluonDir(encVault *vault.Vault) (string, error) {
|
|||||||
return encVault.GetGluonDir(), nil
|
return encVault.GetGluonDir(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newIMAPServer(gluonDir string, version *semver.Version, tlsConfig *tls.Config, logIMAPCommandsClient, logImapCommandsServer bool) (*gluon.Server, error) {
|
func newIMAPServer(gluonDir string, version *semver.Version, tlsConfig *tls.Config, logIMAPCommandsClient, logIMAPCommandsServer bool) (*gluon.Server, error) {
|
||||||
var imapClientLog io.Writer
|
var imapClientLog io.Writer
|
||||||
var imapServerLog io.Writer
|
var imapServerLog io.Writer
|
||||||
|
|
||||||
if logIMAPCommandsClient || logImapCommandsServer {
|
if logIMAPCommandsClient || logIMAPCommandsServer {
|
||||||
log := logrus.WithField("protocol", "IMAP")
|
log := logrus.WithField("protocol", "IMAP")
|
||||||
log.Warning("================================================")
|
log.Warning("================================================")
|
||||||
log.Warning("THIS LOG WILL CONTAIN **DECRYPTED** MESSAGE DATA")
|
log.Warning("THIS LOG WILL CONTAIN **DECRYPTED** MESSAGE DATA")
|
||||||
@ -130,7 +131,7 @@ func newIMAPServer(gluonDir string, version *semver.Version, tlsConfig *tls.Conf
|
|||||||
imapClientLog = io.Discard
|
imapClientLog = io.Discard
|
||||||
}
|
}
|
||||||
|
|
||||||
if logImapCommandsServer {
|
if logIMAPCommandsServer {
|
||||||
imapServerLog = logging.NewIMAPLogger()
|
imapServerLog = logging.NewIMAPLogger()
|
||||||
} else {
|
} else {
|
||||||
imapClientLog = io.Discard
|
imapClientLog = io.Discard
|
||||||
|
|||||||
Reference in New Issue
Block a user