mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
feat: remove tls upgrade error notification
This commit is contained in:
@ -19,6 +19,9 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
* GODT-834 Info about tags in BUILDS.md and link to Import-Export page in README.md.
|
* GODT-834 Info about tags in BUILDS.md and link to Import-Export page in README.md.
|
||||||
* GODT-777 Support Apple Mail MBOX export format.
|
* GODT-777 Support Apple Mail MBOX export format.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* GODT-766 Remove GUI popup for IMAP TLS error.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* GODT-677 Windows IE: global import settings not fit in window.
|
* GODT-677 Windows IE: global import settings not fit in window.
|
||||||
* GODT-794 Congo fails to update to Danube
|
* GODT-794 Congo fails to update to Danube
|
||||||
|
|||||||
2
go.mod
2
go.mod
@ -75,7 +75,7 @@ require (
|
|||||||
|
|
||||||
replace (
|
replace (
|
||||||
github.com/docker/docker-credential-helpers => github.com/ProtonMail/docker-credential-helpers v1.1.0
|
github.com/docker/docker-credential-helpers => github.com/ProtonMail/docker-credential-helpers v1.1.0
|
||||||
github.com/emersion/go-imap => github.com/ProtonMail/go-imap v0.0.0-20201016095853-a7520cc904d3
|
github.com/emersion/go-imap => github.com/ProtonMail/go-imap v0.0.0-20201102134601-418cd74e9474
|
||||||
github.com/emersion/go-smtp => github.com/ProtonMail/go-smtp v0.0.0-20181206232543-8261df20d309
|
github.com/emersion/go-smtp => github.com/ProtonMail/go-smtp v0.0.0-20181206232543-8261df20d309
|
||||||
github.com/jameskeane/bcrypt => github.com/ProtonMail/bcrypt v0.0.0-20170924085257-7509ea014998
|
github.com/jameskeane/bcrypt => github.com/ProtonMail/bcrypt v0.0.0-20170924085257-7509ea014998
|
||||||
golang.org/x/crypto => github.com/ProtonMail/crypto v0.0.0-20200818122824-ed5d25e28db8
|
golang.org/x/crypto => github.com/ProtonMail/crypto v0.0.0-20200818122824-ed5d25e28db8
|
||||||
|
|||||||
4
go.sum
4
go.sum
@ -15,8 +15,8 @@ github.com/ProtonMail/go-apple-mobileconfig v0.0.0-20160701194735-7ea9927a11f6 h
|
|||||||
github.com/ProtonMail/go-apple-mobileconfig v0.0.0-20160701194735-7ea9927a11f6/go.mod h1:EtDfBMIDWmVe4viZCuBTEfe3OIIo0ghbpOaAZVO+hVg=
|
github.com/ProtonMail/go-apple-mobileconfig v0.0.0-20160701194735-7ea9927a11f6/go.mod h1:EtDfBMIDWmVe4viZCuBTEfe3OIIo0ghbpOaAZVO+hVg=
|
||||||
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a h1:fXK2KsfnkBV9Nh+9SKzHchYjuE9s0vI20JG1mbtEAcc=
|
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a h1:fXK2KsfnkBV9Nh+9SKzHchYjuE9s0vI20JG1mbtEAcc=
|
||||||
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a/go.mod h1:oTGdE7/DlWIr23G0IKW3OXK9wZ5Hw1GGiaJFccTvZi4=
|
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a/go.mod h1:oTGdE7/DlWIr23G0IKW3OXK9wZ5Hw1GGiaJFccTvZi4=
|
||||||
github.com/ProtonMail/go-imap v0.0.0-20201016095853-a7520cc904d3 h1:Jvv9t3rSg/ID3Fh+uYsxgmvNI9fYnlab4vtBsbPtmq8=
|
github.com/ProtonMail/go-imap v0.0.0-20201102134601-418cd74e9474 h1:D0RwDtkBw0Gt7hmbb1ivdEulplJAwu1i2jzh4HM45fo=
|
||||||
github.com/ProtonMail/go-imap v0.0.0-20201016095853-a7520cc904d3/go.mod h1:yKASt+C3ZiDAiCSssxg9caIckWF/JG7ZQTO7GAmvicU=
|
github.com/ProtonMail/go-imap v0.0.0-20201102134601-418cd74e9474/go.mod h1:yKASt+C3ZiDAiCSssxg9caIckWF/JG7ZQTO7GAmvicU=
|
||||||
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde h1:5koQozTDELymYOyFbQ/VSubexAEXzDR8qGM5mO8GRdw=
|
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde h1:5koQozTDELymYOyFbQ/VSubexAEXzDR8qGM5mO8GRdw=
|
||||||
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde/go.mod h1:795VPXcRUIQ9JyMNHP4el582VokQfippgjkQP3Gk0r0=
|
github.com/ProtonMail/go-imap-id v0.0.0-20190926060100-f94a56b9ecde/go.mod h1:795VPXcRUIQ9JyMNHP4el582VokQfippgjkQP3Gk0r0=
|
||||||
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a h1:W6RrgN/sTxg1msqzFFb+G80MFmpjMw61IU+slm+wln4=
|
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a h1:W6RrgN/sTxg1msqzFFb+G80MFmpjMw61IU+slm+wln4=
|
||||||
|
|||||||
@ -40,7 +40,6 @@ const (
|
|||||||
NoActiveKeyForRecipientEvent = "noActiveKeyForRecipient"
|
NoActiveKeyForRecipientEvent = "noActiveKeyForRecipient"
|
||||||
UpgradeApplicationEvent = "upgradeApplication"
|
UpgradeApplicationEvent = "upgradeApplication"
|
||||||
TLSCertIssue = "tlsCertPinningIssue"
|
TLSCertIssue = "tlsCertPinningIssue"
|
||||||
IMAPTLSBadCert = "imapTLSBadCert"
|
|
||||||
|
|
||||||
// LogoutEventTimeout is the minimum time to permit between logout events being sent.
|
// LogoutEventTimeout is the minimum time to permit between logout events being sent.
|
||||||
LogoutEventTimeout = 3 * time.Minute
|
LogoutEventTimeout = 3 * time.Minute
|
||||||
|
|||||||
@ -237,13 +237,6 @@ Item {
|
|||||||
winMain.tlsBarState="notOK"
|
winMain.tlsBarState="notOK"
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowIMAPCertTroubleshoot : {
|
|
||||||
go.notifyBubble(1, qsTr(
|
|
||||||
"Bridge was unable to establish a connection with your Email client. <br> <a href=\"https://protonmail.com/support/knowledge-base/bridge-ssl-connection-issue\">Learn more</a> <br>",
|
|
||||||
"notification message"
|
|
||||||
))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,6 @@ Window {
|
|||||||
ListElement { title: "Minimize this" }
|
ListElement { title: "Minimize this" }
|
||||||
ListElement { title: "SendAlertPopup" }
|
ListElement { title: "SendAlertPopup" }
|
||||||
ListElement { title: "TLSCertError" }
|
ListElement { title: "TLSCertError" }
|
||||||
ListElement { title: "IMAPCertError" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
@ -209,9 +208,6 @@ Window {
|
|||||||
case "TLSCertError" :
|
case "TLSCertError" :
|
||||||
go.showCertIssue()
|
go.showCertIssue()
|
||||||
break;
|
break;
|
||||||
case "IMAPCertError" :
|
|
||||||
go.showIMAPCertTroubleshoot()
|
|
||||||
break;
|
|
||||||
default :
|
default :
|
||||||
console.log("Not implemented " + data)
|
console.log("Not implemented " + data)
|
||||||
}
|
}
|
||||||
@ -314,7 +310,6 @@ Window {
|
|||||||
signal failedAutostartCode(string code)
|
signal failedAutostartCode(string code)
|
||||||
|
|
||||||
signal showCertIssue()
|
signal showCertIssue()
|
||||||
signal showIMAPCertTroubleshoot()
|
|
||||||
|
|
||||||
signal updateFinished(bool hasError)
|
signal updateFinished(bool hasError)
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@ package qtcommon
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/therecipe/qt/core"
|
"github.com/therecipe/qt/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -40,17 +40,17 @@ import (
|
|||||||
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/events"
|
"github.com/ProtonMail/proton-bridge/internal/events"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/frontend/autoconfig"
|
"github.com/ProtonMail/proton-bridge/internal/frontend/autoconfig"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/frontend/qt-common"
|
qtcommon "github.com/ProtonMail/proton-bridge/internal/frontend/qt-common"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
|
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/preferences"
|
"github.com/ProtonMail/proton-bridge/internal/preferences"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/updates"
|
"github.com/ProtonMail/proton-bridge/internal/updates"
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/config"
|
"github.com/ProtonMail/proton-bridge/pkg/config"
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/ports"
|
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/useragent"
|
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/ProtonMail/proton-bridge/pkg/ports"
|
||||||
|
"github.com/ProtonMail/proton-bridge/pkg/useragent"
|
||||||
"github.com/kardianos/osext"
|
"github.com/kardianos/osext"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/skratchdot/open-golang/open"
|
"github.com/skratchdot/open-golang/open"
|
||||||
"github.com/therecipe/qt/core"
|
"github.com/therecipe/qt/core"
|
||||||
"github.com/therecipe/qt/gui"
|
"github.com/therecipe/qt/gui"
|
||||||
@ -187,7 +187,6 @@ func (s *FrontendQt) watchEvents() {
|
|||||||
updateApplicationCh := s.getEventChannel(events.UpgradeApplicationEvent)
|
updateApplicationCh := s.getEventChannel(events.UpgradeApplicationEvent)
|
||||||
newUserCh := s.getEventChannel(events.UserRefreshEvent)
|
newUserCh := s.getEventChannel(events.UserRefreshEvent)
|
||||||
certIssue := s.getEventChannel(events.TLSCertIssue)
|
certIssue := s.getEventChannel(events.TLSCertIssue)
|
||||||
imapCertIssue := s.getEventChannel(events.IMAPTLSBadCert)
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case errorDetails := <-errorCh:
|
case errorDetails := <-errorCh:
|
||||||
@ -227,8 +226,6 @@ func (s *FrontendQt) watchEvents() {
|
|||||||
s.Qml.LoadAccounts()
|
s.Qml.LoadAccounts()
|
||||||
case <-certIssue:
|
case <-certIssue:
|
||||||
s.Qml.ShowCertIssue()
|
s.Qml.ShowCertIssue()
|
||||||
case <-imapCertIssue:
|
|
||||||
s.Qml.ShowIMAPCertTroubleshoot()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,6 @@ type GoQMLInterface struct {
|
|||||||
_ func(x, y float32) `slot:"saveOutgoingNoEncPopupCoord"`
|
_ func(x, y float32) `slot:"saveOutgoingNoEncPopupCoord"`
|
||||||
_ func(recipient string) `signal:"showNoActiveKeyForRecipient"`
|
_ func(recipient string) `signal:"showNoActiveKeyForRecipient"`
|
||||||
_ func() `signal:"showCertIssue"`
|
_ func() `signal:"showCertIssue"`
|
||||||
_ func() `signal:"ShowIMAPCertTroubleshoot"`
|
|
||||||
|
|
||||||
_ func() `slot:"startUpdate"`
|
_ func() `slot:"startUpdate"`
|
||||||
_ func(hasError bool) `signal:"updateFinished"`
|
_ func(hasError bool) `signal:"updateFinished"`
|
||||||
|
|||||||
@ -28,7 +28,6 @@ import (
|
|||||||
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
||||||
"github.com/emersion/go-imap"
|
"github.com/emersion/go-imap"
|
||||||
goIMAPBackend "github.com/emersion/go-imap/backend"
|
goIMAPBackend "github.com/emersion/go-imap/backend"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type panicHandler interface {
|
type panicHandler interface {
|
||||||
@ -198,11 +197,3 @@ func (ib *imapBackend) monitorDisconnectedUsers() {
|
|||||||
ib.deleteUser(address)
|
ib.deleteUser(address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ib *imapBackend) upgradeError(err error) {
|
|
||||||
logrus.WithError(err).Error("IMAP connection couldn't be upgraded to TLS during STARTTLS")
|
|
||||||
|
|
||||||
if strings.Contains(err.Error(), "remote error: tls: bad certificate") {
|
|
||||||
ib.eventListener.Emit(events.IMAPTLSBadCert, err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -58,7 +58,6 @@ func NewIMAPServer(debugClient, debugServer bool, port int, tls *tls.Config, ima
|
|||||||
s.AllowInsecureAuth = true
|
s.AllowInsecureAuth = true
|
||||||
s.ErrorLog = newServerErrorLogger("server-imap")
|
s.ErrorLog = newServerErrorLogger("server-imap")
|
||||||
s.AutoLogout = 30 * time.Minute
|
s.AutoLogout = 30 * time.Minute
|
||||||
s.UpgradeError = imapBackend.upgradeError
|
|
||||||
|
|
||||||
serverID := imapid.ID{
|
serverID := imapid.ID{
|
||||||
imapid.FieldName: "ProtonMail Bridge",
|
imapid.FieldName: "ProtonMail Bridge",
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
reflect "reflect"
|
||||||
|
|
||||||
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
reflect "reflect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockPanicHandler is a mock of PanicHandler interface
|
// MockPanicHandler is a mock of PanicHandler interface
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
gomock "github.com/golang/mock/gomock"
|
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
|
gomock "github.com/golang/mock/gomock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockListener is a mock of Listener interface
|
// MockListener is a mock of Listener interface
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
reflect "reflect"
|
||||||
|
|
||||||
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
reflect "reflect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockPanicHandler is a mock of PanicHandler interface
|
// MockPanicHandler is a mock of PanicHandler interface
|
||||||
|
|||||||
@ -5,11 +5,12 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
reflect "reflect"
|
||||||
|
|
||||||
store "github.com/ProtonMail/proton-bridge/internal/store"
|
store "github.com/ProtonMail/proton-bridge/internal/store"
|
||||||
credentials "github.com/ProtonMail/proton-bridge/internal/users/credentials"
|
credentials "github.com/ProtonMail/proton-bridge/internal/users/credentials"
|
||||||
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
reflect "reflect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockConfiger is a mock of Configer interface
|
// MockConfiger is a mock of Configer interface
|
||||||
|
|||||||
Reference in New Issue
Block a user