Changes between Initial Version and Version 1 of Ticket #36000
- Timestamp:
- Dec 11, 2024, 10:54:03 AM (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36000
- Property Has patch unset
- Property Triage Stage Unreviewed → Accepted
- Property Summary Insecure URL Handling (HTTP Protocol Default) in urlize → Update default from http to https in urlize when protocol not provided
-
Ticket #36000 – Description
initial v1 1 Hi Team, 2 In django/utils/html.py ,Line no 347 ,Due to following code, 1 In `django/utils/html.py`, `urlize` there is: 2 {{{ 3 3 url = smart_urlquote("http://%s" % html.unescape(middle)) 4 }}} 4 5 5 When user input does not include protocol it defaultly prefers http (Insecure Protocol). 6 When user input does not include a protocol it defaults to http (Insecure Protocol). 7 6 8 Example : 7 Considered a web app using urlize() for password reset email template 8 input = Password reset link myapp.com/password/reset/{token} 9 output, 10 Password reset link <a href="http://myapp.com/password/reset/{token}"/> 9 Considered a web app using `urlize()` for password reset email template 10 {{{ 11 input = "Password reset link myapp.com/password/reset/{token}" 12 }}} 13 output: 14 {{{ 15 "Password reset link <a href="http://myapp.com/password/reset/{token}"/>" 16 }}} 17 11 18 so when end user of myapp clicks it the url with token sent in http insecure protocol. 12 13 19 This behavior could potentially lead to man-in-the-middle attacks 14 20