72a431dd4b
Switch from using "text/template" to "html/template", which provides basic XSS preventions. We haven't identified any particular place where unsanitized user data is rendered to the frontend. This is just a preventative step. At the same time, make more templates take pure URL instead of forming an URL themselves using an "authReqID" argument. This will help us stop using the auth req ID in certain places, preventing garbage collection from killing login flows that wait too long at the login screen. Also increase the login session window (time between initial redirect and the user logging in) from 30 minutes to 24 hours, and display a more helpful error message when the session expires. How to test: 1. Spin up dex and example with examples/config-dev.yaml. 2. Login through both the password prompt and the direct redirect. 3. Edit examples/config-dev.yaml removing the "connectors" section. 4. Ensure you can still login with a password. (email/password is "admin@example.com" and "password")
19 lines
546 B
HTML
19 lines
546 B
HTML
{{ template "header.html" . }}
|
|
|
|
<div class="theme-panel">
|
|
<h2 class="theme-heading">Log in to {{ issuer }} </h2>
|
|
<div>
|
|
{{ range $c := .Connectors }}
|
|
<div class="theme-form-row">
|
|
<a href="{{ $c.URL }}" target="_self">
|
|
<button class="dex-btn theme-btn-provider">
|
|
<span class="dex-btn-icon dex-btn-icon--{{ $c.ID }}"></span>
|
|
<span class="dex-btn-text">Log in with {{ $c.Name }}</span>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ template "footer.html" . }}
|