• Simon Rawet's avatar
    Added MaxMemory limit to CopyBody() · 52c4c1fb
    Simon Rawet authored
    Beego only uses the MaxMemory flag when using go's built in functions
    for parsing forms. However the CopyBody() function have no limit an will
    coppy anny amount of data into memory using ioutil.ReedAll() on the
    request body whitout anny size validation or limit.
    
    This fix wrapps input.Requst.Body in a LimitedReader using the same
    memory limit as ParseFormOrMulitForm()
    52c4c1fb
Name
Last commit
Last update
..
acceptencoder.go Loading commit data...
acceptencoder_test.go Loading commit data...
context.go Loading commit data...
input.go Loading commit data...
input_test.go Loading commit data...
output.go Loading commit data...