Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid IPv6 URL [ValueError]" when publishing comments #541

Open
palant opened this issue Feb 22, 2016 · 0 comments
Open

"Invalid IPv6 URL [ValueError]" when publishing comments #541

palant opened this issue Feb 22, 2016 · 0 comments

Comments

@palant
Copy link

palant commented Feb 22, 2016

Steps to reproduce:

  1. Upload a file for review containing the following line:
    `* [{{mercurial-book Mercurial: The definite guide (hgbook)}}](http://hgbook.red-bean.com)`
  2. Add a comment draft to this line.
  3. Press M to publish the comments.

Result:

The publish page errors out with "Invalid IPv6 URL [ValueError]".

Analysis:

This is a bug in Django's urlizetrunc template filter (or more precisely django.utils.html.urlize function) which is used in Rietveld's publish.html. It attempts to highlight hgbook)}}](http://hgbook.red-bean.com as a URL and calls urlparse.unsplit() on "http://hgbook)}}](http://hgbook.red-bean.com". This results in the exception above.

The issue was resolved in Django 1.6 by catching the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@palant and others