Sharer shares a file where receiver already has a file with matching name
Description
- user-key encryption is enabled
- Both
user1anduser2have a file with nametestFile.txt user1sharestestFile.txtwithuser2- When
user1gets all the shares shared by him,testFile (2).txtis in the response
When encryption app is not enabled, or master-key encryption is enabled, testFile.txt is in the response, which is the correct response.
The Same behavior is noticed in case of folder sharing
Expected Behavior
testFile.txt should be in the response
Actual Behavior
testFile (2).txt is in the response
Just stumbled upon this, is it still a thing? Because I can't reproduce with OC 10.6 and Encryption 1.4.0.
@HariBhandari07 ^ ?
@JammingBen the issue is still reproducible in the current latest OC and encryption master branch.
For curl -X GET http://172.17.0.1/core1/ocs/v1.php/apps/files_sharing/api/v1/shares -u admin:admin -H 'OCS-APIREQUEST: true' -v
The response is:
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<element>
<id>6</id>
<share_type>0</share_type>
<uid_owner>admin</uid_owner>
<displayname_owner>admin</displayname_owner>
<permissions>19</permissions>
<stime>1612177814</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>admin</uid_file_owner>
<displayname_file_owner>admin</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<path>/testFile.txt</path>
<mimetype>text/plain</mimetype>
<storage_id>home::admin</storage_id>
<storage>1</storage>
<item_type>file</item_type>
<item_source>2147486945</item_source>
<file_source>2147486945</file_source>
<file_parent>3</file_parent>
<file_target>/testFile (2).txt</file_target>
<share_with>hari</share_with>
<share_with_displayname>hari</share_with_displayname>
<share_with_additional_info/>
<mail_send>0</mail_send>
<attributes/>
</element>
</data>
</ocs>
Here, <file_target>/testFile (2).txt</file_target>