Software /
code /
prosody
Diff
spec/scansion/http_upload.scs @ 11319:a4b299e37909
mod_http_file_share: Reject invalid file sizes
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 27 Jan 2021 00:36:49 +0100 |
parent | 11315:c52fcea39c8e |
child | 11360:f36a2e54ac81 |
line wrap: on
line diff
--- a/spec/scansion/http_upload.scs Wed Jan 27 00:29:12 2021 +0100 +++ b/spec/scansion/http_upload.scs Wed Jan 27 00:36:49 2021 +0100 @@ -38,6 +38,19 @@ </iq> Romeo sends: + <iq to='upload.localhost' type='get' id='497c20dd-dda2-4feb-8199-7086e203de46' xml:lang='en'> + <request content-type='text/plain' filename='negative.dat' xmlns='urn:xmpp:http:upload:0' size='-1000'/> + </iq> + +Romeo receives: + <iq id='497c20dd-dda2-4feb-8199-7086e203de46' from='upload.localhost' type='error'> + <error type='modify'> + <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> + <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>File size must be positive integer</text> + </error> + </iq> + +Romeo sends: <iq to='upload.localhost' type='get' id='ac56d83f-a627-4732-8399-60492d1210b6' xml:lang='en'> <request content-type='text/plain' filename='invalid/filename.dat' xmlns='urn:xmpp:http:upload:0' size='1000'/> </iq>