Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2024-03-11 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
-+-
 Reporter:  Marcin Nowak |Owner:  Adam
 |  Zapletal
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  1.8
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Mariusz Felisiak ):

 In [changeset:"710ca576816fe90c15a7e62f95074ff0bbd77f0e" 710ca576]:
 {{{#!CommitTicketReference repository=""
 revision="710ca576816fe90c15a7e62f95074ff0bbd77f0e"
 [5.0.x] Fixed #25595 -- Doc'd that URLValidator rejects file:// URIs
 without a host.

 Backport of 7326513a8f5d4d4e0aeec28540f9451b939b1dda from main
 }}}
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e2c9d904b-721fc4fb-5fde-4f16-b15f-84176bb80ec3-00%40eu-central-1.amazonses.com.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2024-03-11 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
-+-
 Reporter:  Marcin Nowak |Owner:  Adam
 |  Zapletal
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  1.8
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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

Comment:

 In [changeset:"7326513a8f5d4d4e0aeec28540f9451b939b1dda" 7326513a]:
 {{{#!CommitTicketReference repository=""
 revision="7326513a8f5d4d4e0aeec28540f9451b939b1dda"
 Fixed #25595 -- Doc'd that URLValidator rejects file:// URIs without a
 host.
 }}}
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e2c9cddff-3583b70b-0e26-496d-ae78-1c1006370b4f-00%40eu-central-1.amazonses.com.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2024-03-11 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
-+-
 Reporter:  Marcin Nowak |Owner:  Adam
 |  Zapletal
 Type:  Bug  |   Status:  assigned
Component:  Core (Other) |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e2c6078ed-4cad7868-800b-4745-9d5f-3d03b081007f-00%40eu-central-1.amazonses.com.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2024-03-08 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+-
 Reporter:  Marcin Nowak  |Owner:  Adam Zapletal
 Type:  Bug   |   Status:  assigned
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+-
Changes (by Adam Zapletal):

 * cc: Adam Zapletal (added)
 * has_patch:  0 => 1
 * owner:  nobody => Adam Zapletal
 * status:  new => assigned

Comment:

 I opened a PR adding a warning about this to the documentation. I'm happy
 to handle it in a different way if that'd be better.

 For what it's worth, if someone out there wants to validate local file
 URIs, you could start with something like this:

 {{{#!python
 @deconstructible
 class CustomURLValidator(URLValidator):
 def __init__(self, **kwargs):
 super().__init__(**kwargs)

 self.schemes.append('file')

 def __call__(self, value):
 if value.startswith('file:///'):
 value = value.replace('file:///', 'file://localhost/')

 return super().__call__(value)
 }}}
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e21a7a23f-94bb8519-b6ba-4f36-91c5-9aa0d3e4ff37-00%40eu-central-1.amazonses.com.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2015-11-11 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+
 Reporter:  marcinn   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by codingjoe):

 Interestingly enough, if you include the optional host parameter in
 RFC1738 it works: `file://localhost/tmp/file/name`

--
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/065.4f9b86f8ee422ea04694de9df91c3f0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2015-11-11 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+
 Reporter:  marcinn   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by codingjoe):

 I thinks this is both a documentation and code problem. The `URLValidator`
 should raise a value error, if a unsupported schema is set. In the
 documentation it should be explained with RFC 1738 schemas are supported.
 Currently one gets the impression that all are.

--
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/065.d940a79d4c97b569cb45c32c011a9262%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2015-10-22 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+
 Reporter:  marcinn   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by timgraham):

 I had a similar skepticism. If we don't make a change, then let's clarify
 the documentation to prevent further tickets about this.

--
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/065.07e493b3c7b7151783749947c2a3081f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2015-10-22 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+
 Reporter:  marcinn   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by claudep):

 It's `URLValidator` not `URIValidator`, I think you might need your own
 custom validator for this. The current regex is already bloated, I'm not
 sure we should continue to complexify 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/065.30454870fbb9bfd655e0f2085b8cac88%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25595: Invalid regexp in URLValidator can't handle file:// schemes

2015-10-22 Thread Django
#25595: Invalid regexp in URLValidator can't handle file:// schemes
--+
 Reporter:  marcinn   |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * component:  Uncategorized => Core (Other)
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Can this be fixed without special casing the file scheme in the
 validation?

--
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/065.af93d870ffe40060778ebed249a8b353%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.