mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
core: allow URL parameters and POST bodies to co-exist.
Node 8.14.0 prohibits HTTP headers that exceed 8 KB (source:
https://nodejs.org/en/blog/vulnerability/november-2018-security-releases/#denial-of-service-with-large-http-headers-cve-2018-12121).
This patch allows for the parameters within the body of an HTTP POST request to
be used in addition to those within the URL (and will override them).
Closes #3568.
---
Muxator 2019-10-19:
- this commit was cherry-picked from 882b93487f
- it was modified to include the necessary changes in the documentation
This commit is contained in:
parent
6d9264cf3c
commit
fc661ee13a
3 changed files with 35 additions and 6 deletions
|
@ -387,7 +387,8 @@ describe('createPad', function(){
|
|||
|
||||
describe('setText', function(){
|
||||
it('Sets text on a pad Id', function(done) {
|
||||
api.get(endPoint('setText')+"&padID="+testPadId+"&text="+text)
|
||||
api.post(endPoint('setText')+"&padID="+testPadId)
|
||||
.send({text: text})
|
||||
.expect(function(res){
|
||||
if(res.body.code !== 0) throw new Error("Pad Set Text failed")
|
||||
})
|
||||
|
@ -410,7 +411,8 @@ describe('getText', function(){
|
|||
|
||||
describe('setText', function(){
|
||||
it('Sets text on a pad Id including an explicit newline', function(done) {
|
||||
api.get(endPoint('setText')+"&padID="+testPadId+"&text="+text+'%0A')
|
||||
api.post(endPoint('setText')+"&padID="+testPadId)
|
||||
.send({text: text+'\n'})
|
||||
.expect(function(res){
|
||||
if(res.body.code !== 0) throw new Error("Pad Set Text failed")
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue