quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test663 (1519B)


      1 <testcase>
      2 #
      3 # This test is crafted to reproduce oss-fuzz bug
      4 # https://crbug.com/oss-fuzz/17954
      5 #
      6 <info>
      7 <keywords>
      8 HTTP
      9 HTTP GET
     10 HTTP proxy
     11 followlocation
     12 </keywords>
     13 </info>
     14 #
     15 # Server-side
     16 <reply>
     17 <data>
     18 HTTP/1.1 302 OK
     19 Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no
     20 Date: Tue, 09 Nov 2010 14:49:00 GMT
     21 Content-Length: 0
     22 
     23 </data>
     24 <data2>
     25 HTTP/1.1 200 OK
     26 Location: this should be ignored
     27 Date: Tue, 09 Nov 2010 14:49:00 GMT
     28 Content-Length: 5
     29 
     30 body
     31 </data2>
     32 <datacheck>
     33 HTTP/1.1 302 OK
     34 Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no
     35 Date: Tue, 09 Nov 2010 14:49:00 GMT
     36 Content-Length: 0
     37 
     38 HTTP/1.1 200 OK
     39 Location: this should be ignored
     40 Date: Tue, 09 Nov 2010 14:49:00 GMT
     41 Content-Length: 5
     42 
     43 body
     44 </datacheck>
     45 </reply>
     46 
     47 #
     48 # Client-side
     49 <client>
     50 <server>
     51 http
     52 </server>
     53 <name>
     54 HTTP redirect with dotdots and whitespaces in absolute Location: URL
     55 </name>
     56 <command>
     57 http://example.com/please/../gimme/%TESTNUMBER?foobar#hello -L -x http://%HOSTIP:%HTTPPORT
     58 </command>
     59 <features>
     60 proxy
     61 </features>
     62 </client>
     63 
     64 #
     65 # Verify data after the test has been "shot"
     66 <verify>
     67 <protocol>
     68 GET http://example.com/gimme/%TESTNUMBER?foobar HTTP/1.1
     69 Host: example.com
     70 User-Agent: curl/%VERSION
     71 Accept: */*
     72 Proxy-Connection: Keep-Alive
     73 
     74 GET http://example.net/there/tes%20t%20case=/%TESTNUMBER0002?+yes+no HTTP/1.1
     75 Host: example.net
     76 User-Agent: curl/%VERSION
     77 Accept: */*
     78 Proxy-Connection: Keep-Alive
     79 
     80 </protocol>
     81 </verify>
     82 </testcase>