On Tuesday, February 17, 2015 at 12:30:25 AM UTC+1, Curtis Maloney wrote:
>
> Ran into this bug this morning... what's the rationale behind JsonResponse 
> only accepting dict types unless you set safe=False to allow _any_ type?
>

Cause dict maps to object which is somewhat safe.
 

> Surely list/tuple should also be permitted?
>

No, the safeguard is especially for those! See 
http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx/
 
and 
http://incompleteness.me/blog/2007/03/05/json-is-not-as-safe-as-people-think-it-is/
 
for details.

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c31944e1-a4f5-4ed9-91e0-aee9f2d7fb9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to