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") |
||
---|---|---|
.. | ||
internal | ||
api.go | ||
api_test.go | ||
doc.go | ||
handlers.go | ||
handlers_test.go | ||
oauth2.go | ||
oauth2_test.go | ||
rotation.go | ||
rotation_test.go | ||
server.go | ||
server_test.go | ||
templates.go | ||
templates_test.go |