Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haribhandari07 opened this issue Jun 18, 2020 · 3 comments
Labels

Comments

@haribhandari07
Copy link
Contributor

haribhandari07 commented Jun 18, 2020

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

@JammingBen
Copy link
Contributor

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

@phil-davis
Copy link
Contributor

@haribhandari07 ^ ?

@haribhandari07
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants