Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-19 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
-+-
 Reporter:  Jerome Leclanche |Owner:  Jerome
 |  Leclanche
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"a849ec1880e6e9926bd04e298c0ded2611cfb4b3" a849ec18]:
 {{{
 #!CommitTicketReference repository=""
 revision="a849ec1880e6e9926bd04e298c0ded2611cfb4b3"
 Fixed #27606 -- Fixed HttpResponseRedirect.__repr__() crash when
 DisallowedRedirect is raised.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.f706961c474b178dcd91c36654783c04%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-18 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
-+-
 Reporter:  Jerome Leclanche |Owner:  Jerome
 |  Leclanche
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * needs_tests:  1 => 0


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.1022aae30bd5594dba734fc18b36d81c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-17 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
-+-
 Reporter:  Jerome Leclanche |Owner:  Jerome
 |  Leclanche
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Tim Graham):

 * has_patch:  0 => 1
 * needs_tests:  0 => 1


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.70e8ac49b1f61c129e3bcaa18f1a9a36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-17 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
-+-
 Reporter:  Jerome Leclanche |Owner:  Jerome
 |  Leclanche
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Jerome Leclanche):

 https://github.com/django/django/pull/7708

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.0790dfbe538a8774303ffbd03ba63e10%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-17 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
-+-
 Reporter:  Jerome Leclanche |Owner:  Jerome
 |  Leclanche
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Jerome Leclanche):

 * owner:  nobody => Jerome Leclanche
 * status:  new => assigned


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.8bf5d7870fd488b622d07ce835ca4c69%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-17 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
--+
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by Tim Graham):

 Yes.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.48d100e0ef32dc6b77969e42de390e6d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost

2016-12-17 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
--+
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by tundebabzy):

 Replying to [comment:6 Tim Graham]:
 > I think it would be fine.
 Do you mean it would be fine to call super before raising the exception?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.132e14c4feb7c870d1b65ae103410b1f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect when __init__() raises DisallowedHost (was: Error in formatting HttpResponseRedirect)

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect when __init__() raises
DisallowedHost
--+
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by Tim Graham):

 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 I think it would be fine.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.aea135e102f3525f5d29788f76493f52%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Jerome Leclanche):

 In 95% of cases it's just a cosmetic issue on the django debug page, but I
 suspect it might actually obscure other bugs, especially if someone is
 using Sentry or a similar exception catcher.

 Is there a reason why the exception is raised before super()? It seems
 incorrect to do so at first glance.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.3fc49ff6f3cec64fc1765945afd0116c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Tim Graham):

 Thanks. `HttpResponseBase` aliases ` __str__ = serialize_headers`. A
 solution could be to define a complete  `__str__` that uses the value of
 `super()` if `self._headers` isn't set. I'm not sure it's worth it. Is the
 formatting error more than a minor cosmetic problem?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.94899d6295d38eb2f7afbc40cf64a9bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Jerome Leclanche):

 * Attachment "example.png" added.

 Example screenshot

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.e1e971fffbe603d7944ff3448c6ae7d1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Jerome Leclanche):

 The easiest way to reproduce it is to initialize `HttpResponseRedirect
 ("invalid-scheme://foo")` from a django view and look at the resulting
 debug variables. It's a trivial error as it *should* only appear when
 catching the exception and debugging it.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.8a169690c57a020a3ca6967b596538d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  HTTP handling |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Tim Graham):

 * component:  Uncategorized => HTTP handling


Comment:

 Could you provide a complete snippet or a test for Django's test suite
 that demonstrates the problem?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.b55a3212aca29bd182941d7979ea9b3a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27606: Error in formatting HttpResponseRedirect

2016-12-15 Thread Django
#27606: Error in formatting HttpResponseRedirect
--+--
 Reporter:  Jerome Leclanche  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Uncategorized |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Description changed by Jerome Leclanche:

Old description:

> When initializing an HttpResponseRedirect with a redirect url that does
> not match the `allowed_schemes` attribute, the DisallowedRedirect
> exception is raised before ``super(HttpResponseRedirectBase,
> self).__init__(*args, **kwargs)`` is called, which sets `self._headers`.
>
> This causes repr()ing/printing the response to error out with
> AttributeError: 'HttpResponseRedirect' object has no attribute
> '_headers'.
>
> Ref: django/http/response.py (HttpResponseRedirectBase)

New description:

 When initializing an HttpResponseRedirect with a redirect url that does
 not match the `allowed_schemes` attribute, the DisallowedRedirect
 exception is raised before `super(HttpResponseRedirectBase,
 self).__init__(*args, **kwargs)` is called, which sets `self._headers`.

 This causes repr()ing/printing the response to error out with
 AttributeError: 'HttpResponseRedirect' object has no attribute '_headers'.

 Ref: django/http/response.py (HttpResponseRedirectBase)

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.b766c2ece9f6f5479477c1301de91cbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.