From 83712a6937fdb7654e85c4e54126e28c2fdadcc9 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Wed, 20 Dec 2023 19:04:40 +0000 Subject: [PATCH] pwr: fix set password for jellyfin PWRs --- views.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views.go b/views.go index 3bd9c16..51ccca8 100644 --- a/views.go +++ b/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)