Skip to content

Commit d3669eb

Browse files
authored
sfe: Fix broken unpause form (#8075)
Fix incorrect struct member name cause broken unpause form caused by #8066. Add the `text/html` Content-Type header to all rendered templates.
1 parent b491abb commit d3669eb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sfe/pages/unpause-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>Action required to unpause your account</h1>
99
following:
1010
</p>
1111
<ul>
12-
{{ range $identifier := .Identifiers }}<li>{{ $identifier}}</li>{{ end }}
12+
{{ range $identifier := .Idents }}<li>{{ $identifier}}</li>{{ end }}
1313
</ul>
1414
<p>
1515
These identifiers were paused after consistently failing validation

sfe/sfe.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func (sfe *SelfServiceFrontEndImpl) renderTemplate(w http.ResponseWriter, filena
124124
return
125125
}
126126

127+
w.Header().Set("Content-Type", "text/html; charset=utf-8")
127128
err := sfe.templatePages.ExecuteTemplate(w, filename, dynamicData)
128129
if err != nil {
129130
http.Error(w, err.Error(), http.StatusInternalServerError)
@@ -169,6 +170,8 @@ func (sfe *SelfServiceFrontEndImpl) UnpauseForm(response http.ResponseWriter, re
169170
return
170171
}
171172

173+
// If any of these values change, ensure any relevant pages in //sfe/pages/
174+
// are also updated.
172175
type tmplData struct {
173176
PostPath string
174177
JWT string

0 commit comments

Comments
 (0)