#26249: ManifestStaticFilesStorage crashes on absolute URLs
-------------------------------------+-------------------------------------
     Reporter:  aaugustin            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.staticfiles  |                  Version:  1.9
     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 Aymeric Augustin <aymeric.augustin@…>):

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


Comment:

 In [changeset:"706b33fef80b8b0901fdd2e954e5e5ea189a528a" 706b33fe]:
 {{{
 #!CommitTicketReference repository=""
 revision="706b33fef80b8b0901fdd2e954e5e5ea189a528a"
 Fixed #26249 -- Fixed collectstatic crash for files in STATIC_ROOT
 referenced by absolute URL.

 collectstatic crashed when:

 * a hashing static file storage backend was used
 * a static file referenced another static file located directly in
   STATIC_ROOT (not a subdirectory) with an absolute URL (which must
   start with STATIC_URL, which cannot be empty)

 It seems to me that the current code reimplements relative path joining
 and doesn't handle edge cases correctly. I suspect it assumes that
 STATIC_URL is of the form r'/[^/]+/'.

 Throwing out that code in favor of the posixpath module makes the logic
 easier to follow. Handling absolute paths correctly also becomes easier.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26249#comment:5>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.45b712d8b2c8f30024541560a0655e31%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to