[Django] #34763: Should we disallow URLs as user fields?

5 views
Skip to first unread message

Django

unread,
Aug 3, 2023, 11:50:51 AM8/3/23
to django-...@googlegroups.com
#34763: Should we disallow URLs as user fields?
----------------------------------------+------------------------
Reporter: Mike Lissner | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
----------------------------------------+------------------------
We just got a vulnerability reported to us that an attacker can input a
URL as the username when registering for our site. If they do, we send an
email that says, essentially, "Hello, www.evil-url.com, please confirm
your email address by clicking below..." Other places in the website where
their username is shown could also be trouble, I suppose, too.

It's really not a bad vulnerability, but it's not great either, so I'm
filing this publicly even though it's a security vulnerability, just
barely.

We're going to address this in our websites, starting here:

https://github.com/freelawproject/bigcases2/issues/342

Would it be helpful to do it upstream in Django itself instead/also? We
could probably help with that if so.

--
Ticket URL: <https://code.djangoproject.com/ticket/34763>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 3, 2023, 12:52:50 PM8/3/23
to django-...@googlegroups.com
#34763: Should we disallow URLs as user fields?
------------------------------+--------------------------------------

Reporter: Mike Lissner | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 4.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

I can imagine situation when URLs in username are desirable. IMO, deciding
for users in such cases is not a framework job. We shouldn't be so caring.

--
Ticket URL: <https://code.djangoproject.com/ticket/34763#comment:1>

Reply all
Reply to author
Forward
0 new messages