by gojomo · 14y ago · 0 comments
Or is the mention of password resets an indicator that an attacker, in their own separate connection, can contaminate an email sent to other users with bad URLs? (If so, detecting suspicious Host values would seem to leave a risk that legal-looking but wrong Host values are still trusted by the email mechanism.)
1. Links are rendered via some function that takes into account the user's current request (ie: to determine the proper host)
2. The "reset your password by clicking this link" URL is generated using that function.
3. I am a malicious attacker and I submit a password reset request for your account.
Thus, I can control the URL that is sent to you in an email.
[So please upgrade!]
It seems to me that the deeper risk is composing emails based on a passed Host value, rather than any sort of canonical name the site has for itself. Does the warning about avoiding domain-wildcard setups mean this is still a risk, even after the latest fix?
No, it's not. As the release notes say, "Some attacks against this are beyond Django's ability to control, and require the web server to be properly configured"; see https://docs.djangoproject.com/en/1.4/topics/security/#host-... for details.