diff --git a/routers/web/web.go b/routers/web/web.go
index 1ef407c3b98..84b4227ccfc 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -197,7 +197,6 @@ func verifyAuthWithOptionsWeb(options *common.VerifyOptions) func(ctx *context.C
ctx.HTTPError(http.StatusUnauthorized, ctx.Locale.TrString("auth.must_change_password"))
return
}
- middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI())
ctx.Redirect(setting.AppSubURL + "/user/settings/change_password")
return
}
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl
index 65816badcca..5bceda34840 100644
--- a/templates/base/head_navbar.tmpl
+++ b/templates/base/head_navbar.tmpl
@@ -44,8 +44,8 @@
{{if and .IsSigned .MustChangePassword}}
-
- {{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
+
+ {{ctx.AvatarUtils.Avatar .SignedUser 24}}
{{.SignedUser.Name}}
{{svg "octicon-triangle-down"}}
diff --git a/templates/base/head_navbar_icons.tmpl b/templates/base/head_navbar_icons.tmpl
index 7a88650c0e5..09543efc5c7 100644
--- a/templates/base/head_navbar_icons.tmpl
+++ b/templates/base/head_navbar_icons.tmpl
@@ -1,6 +1,6 @@
{{- $itemExtraClass := .ItemExtraClass -}}
{{- $data := .PageGlobalData -}}
-{{if and $data $data.IsSigned}}{{/* data may not exist, for example: rendering 503 page before the PageGlobalData middleware */}}
+{{if and $data $data.IsSigned (not ctx.RootData.MustChangePassword)}}{{/* data may not exist, for example: rendering 503 page before the PageGlobalData middleware */}}
{{- $activeStopwatch := call $data.GetActiveStopwatch -}}
{{- $notificationUnreadCount := call $data.GetNotificationUnreadCount -}}
{{/* always rendered so a real-time push can reveal it without a reload */}}