Re: Unicode normalization for username field

2016-04-21 Thread Aymeric Augustin
Hello, Judging from the (rather confused) discussion on the users lists, it looks like we’re discussing in the abstract. No one has tested whether the problem can happen with Django. Since the ticket quoted below says Django (unexpectedly) accepts non-ascii usernames on Python 3, it’s just a m

Re: Unicode normalization for username field

2016-04-21 Thread Rick Leir
Thanks. To summarize quickly, (corrections please) 2008 - Usernames in django.contrib.auth are restricted to ASCII alphanumerics. Allowing Unicode seems fairly simple: compile the validator's regular expression with the re.UNICODE flag. but: http://en.wikipedia.org/wiki/Internationalized_doma

Re: Enforcing a max size for form field values read into memory (review/determination of next steps needed)

2016-04-21 Thread Rick Leir
As noted in the ticket, PHP has built in limit in its config http://stackoverflow.com/questions/2364840/what-is-the-size-limit-of-a-post-request Apache can limit it "LimitRequestBody 1048576" http://modwsgi.readthedocs.org/en/develop/user-guides/configuration-guidelines.html#limiting-request

Re: Unicode normalization for username field

2016-04-21 Thread Tim Graham
Here is one: https://groups.google.com/d/topic/django-developers/6aAHgP5g0lA/discussion (all I did was search "unicode username") Here's a relevant Trac ticket: https://code.djangoproject.com/ticket/21379 On Thursday, April 21, 2016 at 11:22:54 AM UTC-4, Rick Leir wrote: > > Hi all, > We have di

Unicode normalization for username field

2016-04-21 Thread Rick Leir
Hi all, We have discussed the possibility of username spoofing in the users list. https://groups.google.com/d/msg/django-users/Q0WDYqJsBsY/Sq-P0814LwAJ "It's not important until this happens: https://labs.spotify.com/2013/06/18/creative-usernames/ But my searches did not turn up anything in t

Re: Rendering model attributes names translated by gettext() that contain non-ascii chars crash django admin?

2016-04-21 Thread Tim Graham
We need a sample project or a test for Django's test suite that reproduces the issue. Generally, "is it a bug?" questions are more appropriate for django-users. After directing your query there, you can create a Trac ticket if others confirm it's a bug in Django and not in your own project. On

Rendering model attributes names translated by gettext() that contain non-ascii chars crash django admin?

2016-04-21 Thread Rafał Pitoń
I'm on django 1.9.5 and I can't access admin panel for user because django admin crashes on template render. It seems that it reverses _('users') into "użytkownicy", and then crashes when rendering template " django/contrib/admin/templates/admin/change_list.html" on line 91 ("{% result_list cl

Re: typeshed stubs for mypy

2016-04-21 Thread Pradip Caulagi
On 21/04/16 11:26, Florian Apolloner wrote: stub files would do it too, but all in all it seems much work for not much gain. I created some stub files here - https://github.com/caulagi/django-mypy/tree/master/stubs/django. It is not complete, but it is working for my toy example. I used st

Re: typeshed stubs for mypy

2016-04-21 Thread Anssi Kääriäinen
I think we can use type annotations in comments, and I do think this could be useful in some cases as a hint to autocomplete systems in IDEs. What I'm afraid is that if we add annotations somewhere, we'll have really hard time determining when to stop when requests for more type hints arrive. So,

Re: typeshed stubs for mypy

2016-04-21 Thread Florian Apolloner
stub files would do it too, but all in all it seems much work for not much gain. On Thursday, April 21, 2016 at 2:20:44 AM UTC+2, Tim Graham wrote: > > My understanding is that adding type annotations must wait until we drop > support for Python 2 which will happen after we cut the stable/1.11.x