gyselroth / balloon

High performance, feature rich document management system written for the cloud
GNU General Public License v3.0
19 stars 7 forks source link

POST /api/v2/nodes/{node}/clone?conflict=1 ends with error 500 if node name has no dot #433

Closed raffis closed 4 years ago

raffis commented 4 years ago

Describe the bug

method: POST
uri: /api/v2/nodes/5e1468f6c8d67b24b0769b70/clone?conflict=1
headers: 
    Accept: application/json; charset=utf-8
    User-Agent: Dredd/12.2.0 (Linux 4.15.0-20-generic; x64)
    Authorization:  Basic YWRtaW46YWRtaW4=

statusCode: 500
headers: 
    content-length: 87
    content-type: application/json; charset=utf-8
    date: Tue, 07 Jan 2020 11:18:15 GMT
    server: nginx/1.17.6
    x-powered-by: PHP/7.3.12
    connection: close

body: 
{
  "error": "TypeError",
  "message": "substr() expects parameter 1 to be string, bool given"
}

To Reproduce

  1. Create file called foobar
  2. Clone node with rename conflict action (1) to the same parent

Expected behavior

No such error, duplicate name should be foobar (xxxx)

Environment