aboutsummaryrefslogtreecommitdiffstats
path: root/spec/scansion/http_upload.scs
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-27 00:36:49 +0100
committerKim Alvefur <zash@zash.se>2021-01-27 00:36:49 +0100
commit3ab51f686468eac1693b611d0526b20fed6bcd6e (patch)
tree2ed9d3767f5bcaa68f4e6be3a047e637c9fd85ca /spec/scansion/http_upload.scs
parentdebea1badc4630e49303e71848bda7cd28559c74 (diff)
downloadprosody-3ab51f686468eac1693b611d0526b20fed6bcd6e.tar.gz
prosody-3ab51f686468eac1693b611d0526b20fed6bcd6e.zip
mod_http_file_share: Reject invalid file sizes
Diffstat (limited to 'spec/scansion/http_upload.scs')
-rw-r--r--spec/scansion/http_upload.scs13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/scansion/http_upload.scs b/spec/scansion/http_upload.scs
index ab87ddee..f43fb3cb 100644
--- a/spec/scansion/http_upload.scs
+++ b/spec/scansion/http_upload.scs
@@ -38,6 +38,19 @@ Romeo receives:
</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>