@@ -29,6 +29,22 @@ Feature: transfer-ownership
2929 And using received transfer folder of "user1" as dav path
3030 And as "user1" the folder "/test" exists
3131
32+ Scenario : transferring ownership from user with risky display name
33+ Given user "user0" with displayname "user0 \" risky\" ? ヂspḷay 'na|\/ |e':.#" exists
34+ And user "user1" exists
35+ And User "user0" created a folder "/test"
36+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
37+ When transferring ownership from "user0" to "user1"
38+ And the command was successful
39+ And As an "user1"
40+ And using received transfer folder of "user1" as dav path
41+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
42+ And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on"
43+ And using old dav path
44+ And as "user0" the folder "/test" does not exist
45+ And using received transfer folder of "user1" as dav path
46+ And as "user1" the folder "/test" exists
47+
3248 Scenario : transferring ownership of file shares
3349 Given user "user0" exists
3450 And user "user1" exists
@@ -290,6 +306,20 @@ Feature: transfer-ownership
290306 Then the command error output contains the text "Unknown target user"
291307 And the command failed with exit code 1
292308
309+ Scenario : transferring ownership of a file
310+ Given user "user0" exists
311+ And user "user1" exists
312+ And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
313+ When transferring ownership of path "somefile.txt" from "user0" to "user1"
314+ And the command was successful
315+ And As an "user1"
316+ And using received transfer folder of "user1" as dav path
317+ Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
318+ And using old dav path
319+ And as "user0" the file "/somefile.txt" does not exist
320+ And using received transfer folder of "user1" as dav path
321+ And as "user1" the file "/somefile.txt" exists
322+
293323 Scenario : transferring ownership of a folder
294324 Given user "user0" exists
295325 And user "user1" exists
@@ -305,6 +335,73 @@ Feature: transfer-ownership
305335 And using received transfer folder of "user1" as dav path
306336 And as "user1" the folder "/test" exists
307337
338+ Scenario : transferring ownership from user with risky display name
339+ Given user "user0" with displayname "user0 \" risky\" ? ヂspḷay 'na|\/ |e':.#" exists
340+ And user "user1" exists
341+ And User "user0" created a folder "/test"
342+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
343+ When transferring ownership of path "test" from "user0" to "user1"
344+ And the command was successful
345+ And As an "user1"
346+ And using received transfer folder of "user1" as dav path
347+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
348+ And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on"
349+ And using old dav path
350+ And as "user0" the folder "/test" does not exist
351+ And using received transfer folder of "user1" as dav path
352+ And as "user1" the folder "/test" exists
353+
354+ Scenario : transferring ownership of path does not affect other files
355+ Given user "user0" exists
356+ And user "user1" exists
357+ And User "user0" created a folder "/test"
358+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
359+ And User "user0" created a folder "/test2"
360+ And User "user0" uploads file "data/textfile.txt" to "/test2/somefile.txt"
361+ When transferring ownership of path "test" from "user0" to "user1"
362+ And the command was successful
363+ And As an "user1"
364+ And using received transfer folder of "user1" as dav path
365+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
366+ And using old dav path
367+ And as "user0" the folder "/test" does not exist
368+ And as "user0" the folder "/test2" exists
369+ And as "user0" the file "/test2/somefile.txt" exists
370+ And using received transfer folder of "user1" as dav path
371+ And as "user1" the folder "/test" exists
372+ And as "user1" the folder "/test2" does not exist
373+
374+ Scenario : transferring ownership of path does not affect other shares
375+ Given user "user0" exists
376+ And user "user1" exists
377+ And User "user0" created a folder "/test"
378+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
379+ And User "user0" created a folder "/test2"
380+ And User "user0" uploads file "data/textfile.txt" to "/test2/sharedfile.txt"
381+ And file "/test2/sharedfile.txt" of user "user0" is shared with user "user1" with permissions 19
382+ And user "user1" accepts last share
383+ When transferring ownership of path "test" from "user0" to "user1"
384+ And the command was successful
385+ And As an "user1"
386+ And using received transfer folder of "user1" as dav path
387+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
388+ And using old dav path
389+ And as "user0" the folder "/test" does not exist
390+ And as "user0" the folder "/test2" exists
391+ And as "user0" the file "/test2/sharedfile.txt" exists
392+ And using received transfer folder of "user1" as dav path
393+ And as "user1" the folder "/test" exists
394+ And as "user1" the folder "/test2" does not exist
395+ And using old dav path
396+ And as "user1" the file "/sharedfile.txt" exists
397+ And As an "user1"
398+ And Getting info of last share
399+ And the OCS status code should be "100"
400+ And Share fields of last share match with
401+ | uid_owner | user0 |
402+ | uid_file_owner | user0 |
403+ | share_with | user1 |
404+
308405 Scenario : transferring ownership of file shares
309406 Given user "user0" exists
310407 And user "user1" exists
0 commit comments