encryption icon indicating copy to clipboard operation
encryption copied to clipboard

Sharer shares a file where receiver already has a file with matching name

Open haribhandari07 opened this issue 5 years ago • 3 comments

Description

  1. user-key encryption is enabled
  2. Both user1 and user2 have a file with name testFile.txt
  3. user1 shares testFile.txt with user2
  4. When user1 gets all the shares shared by him, testFile (2).txt is 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

haribhandari07 avatar Jun 18 '20 09:06 haribhandari07

Just stumbled upon this, is it still a thing? Because I can't reproduce with OC 10.6 and Encryption 1.4.0.

JammingBen avatar Jan 29 '21 09:01 JammingBen

@HariBhandari07 ^ ?

phil-davis avatar Jan 29 '21 09:01 phil-davis

@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>

haribhandari07 avatar Feb 01 '21 11:02 haribhandari07