Changeset 32591 in project


Ignore:
Timestamp:
07/14/15 20:13:33 (5 years ago)
Author:
sjamaan
Message:

intarweb: Do not try to strip pathname from 'name' attribute in form values (those may be arbitrary names sent by the form). Thanks to "rsenior" from #chicken on IRC

Location:
release/4/intarweb/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/intarweb/trunk/header-parsers.scm

    r32406 r32591  
    730730    (list (conc (unparse-token type)
    731731                (unparse-params (get-params (car header-contents))
    732                                 `((name . ,pathname-strip-directory)
    733                                   (filename . ,pathname-strip-directory)
     732                                `((filename . ,pathname-strip-directory)
    734733                                  (size . ,(lambda (x) (cons RAW (number->string x))))
    735734                                  (creation-date . ,rfc1123-time->string)
  • release/4/intarweb/trunk/tests/run.scm

    r32406 r32591  
    806806          "Content-Disposition: form-data; name=\"foo\"; filename=\"a b c\"\r\n"
    807807          (test-unparse-headers `((content-disposition
    808                                    #(form-data ((name . "foo")
     808                                   #(form-data ((name . foo)
    809809                                                (filename . "blabla/a b c")))))))
    810810    (test "Size and dates are recognised correctly"
Note: See TracChangeset for help on using the changeset viewer.