mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Remove plaintext Fever password from database
This commit is contained in:
parent
93f90dae68
commit
37bc451741
8 changed files with 23 additions and 24 deletions
|
@ -47,7 +47,6 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.InstapaperPassword = i.InstapaperPassword
|
||||
integration.FeverEnabled = i.FeverEnabled
|
||||
integration.FeverUsername = i.FeverUsername
|
||||
integration.FeverPassword = i.FeverPassword
|
||||
integration.WallabagEnabled = i.WallabagEnabled
|
||||
integration.WallabagURL = i.WallabagURL
|
||||
integration.WallabagClientID = i.WallabagClientID
|
||||
|
|
|
@ -38,7 +38,6 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
|
|||
InstapaperPassword: integration.InstapaperPassword,
|
||||
FeverEnabled: integration.FeverEnabled,
|
||||
FeverUsername: integration.FeverUsername,
|
||||
FeverPassword: integration.FeverPassword,
|
||||
WallabagEnabled: integration.WallabagEnabled,
|
||||
WallabagURL: integration.WallabagURL,
|
||||
WallabagClientID: integration.WallabagClientID,
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
"miniflux.app/locale"
|
||||
"miniflux.app/ui/form"
|
||||
|
@ -42,7 +42,9 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
if integration.FeverEnabled {
|
||||
integration.FeverToken = fmt.Sprintf("%x", md5.Sum([]byte(integration.FeverUsername+":"+integration.FeverPassword)))
|
||||
if integrationForm.FeverPassword != "" {
|
||||
integration.FeverToken = fmt.Sprintf("%x", md5.Sum([]byte(integration.FeverUsername+":"+integrationForm.FeverPassword)))
|
||||
}
|
||||
} else {
|
||||
integration.FeverToken = ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue