mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 00:50:12 +00:00
pwr: fix set password for jellyfin PWRs
This commit is contained in:
parent
290d02d248
commit
83712a6937
5
views.go
5
views.go
@ -280,7 +280,8 @@ func (app *appContext) ResetPassword(gc *gin.Context) {
|
||||
"ombiEnabled": app.config.Section("ombi").Key("enabled").MustBool(false),
|
||||
}
|
||||
pwr, isInternal := app.internalPWRs[pin]
|
||||
if isInternal && setPassword {
|
||||
// if isInternal && setPassword {
|
||||
if setPassword {
|
||||
data["helpMessage"] = app.config.Section("ui").Key("help_message").String()
|
||||
data["successMessage"] = app.config.Section("ui").Key("success_message").String()
|
||||
data["jfLink"] = app.config.Section("ui").Key("redirect_url").String()
|
||||
@ -324,7 +325,7 @@ func (app *appContext) ResetPassword(gc *gin.Context) {
|
||||
var status int
|
||||
var err error
|
||||
var username string
|
||||
if !isInternal {
|
||||
if !isInternal && !setPassword {
|
||||
resp, status, err = app.jf.ResetPassword(pin)
|
||||
} else if time.Now().After(pwr.Expiry) {
|
||||
app.debug.Printf("Ignoring PWR request due to expired internal PIN: %s", pin)
|
||||
|
Loading…
Reference in New Issue
Block a user