Core: Different entries in oc_share_external for remote shares and mounted public links

Created on 17 Apr 2015  路  12Comments  路  Source: owncloud/core

+----+-----------------------------------+-----------------+----------+------+--------------+------+------------+----------------------------------+-----------+----------+
| id | remote                            | share_token     | password | name | owner        | user | mountpoint | mountpoint_hash                  | remote_id | accepted |
+----+-----------------------------------+-----------------+----------+------+--------------+------+------------+----------------------------------+-----------+----------+
|  1 | https://URL/owncloud/             | 2YvzKz9JrHZU7Up |          | /abc | mjob         | mjob | /abc       | 482a7143ac747eff5e5a5992a6016d65 |      4390 |        1 |
|  2 | https://URL/owncloud              | p72KeK7l0Z0ZYKl |          | /def | Morris Jobke | mjob | /def       | a532d6c8869e005526fcd4e70fbc392d |        -1 |        1 |
+----+-----------------------------------+-----------------+----------+------+--------------+------+------------+----------------------------------+-----------+----------+
  • 1 - was added via share dropdown and type in [email protected] -> has userid as owner - has additional / in remote URL
  • 2 - was added via share dropdown, share via link -> add to my owncloud button on public link page -> has Display Name as owner - -1 as remote_id

@schiesbn Shouldn't be both entries the same? Can we unify this? Otherwise it maybe get confusing really soon and cause more trouble than actually needed.

Bug federated-cloud-sharing sev3-medium

All 12 comments

@schiesbn @rullzer

@rullzer is that still the case in 9.0 ?

Uhm I think so. @schiesbn as far as I know you did not touch this part yet right?

Still the same on todays master:

bildschirmfoto 2016-03-02 um 13 09 16

Just stumbled over this when looking for an existing bug report. I think this is the same issue as I want to report:

  • When creating a federated share for a file that before was shared with you via 1) the receiver sees the share as shared by you (A shares 'file' with B; B creates federated share for 'file' C@federated.oc.com -> C sees federated share 'file' shared by B -> nice)
  • When creating a federated share for a file that before was shared with you via 2) the receiver sees the share as shared by the original owner who shared with you (A shares 'file' with B; B creates link share for 'file' and sends link to C; C adds link to his oC -> C sees federated share 'file' shared by A -> not so nice)

This is inconsistent and does not work as designed, right? I furthermore think that this results from the issue described above and should be fixed. @hodyroff

Note that since 9.1 we added "flat federated reshares". This means that if A fed shares with B and B fed shares with C, then C will see "shared by A" because A is the real owner. It also prevents having a long chain of shares which internally results in server C calling server B calling server A. No, now server C calls server A directly for better performance.

Now when mixing fed shares with link shares... not sure...

Note that since 9.1 we added "flat federated reshares". This means that if A fed shares with B and B fed shares with C, then C will see "shared by A" because A is the real owner. It also prevents having a long chain of shares which internally results in server C calling server B calling server A. No, now server C calls server A directly for better performance.
Now when mixing fed shares with link shares... not sure...

Yup, I know. Makes sense and is very nice. Nevertheless C should "see" that B shared with him because maybe he doesn't even know A which can cause confusion, for instance. Technically the share should of course happen between A and C for the mentioned reasons. Moreover visually as well as technically _creating a federated share via federated cloud id_ and _adding a federated share via a link_ should behave identically, right?

a federated share via federated cloud id and adding a federated share via a link should behave identically, right?

Unfortunately no, because on the technical level they are slightly different.

When you create a direct federated share with someone, there is a real connection made to the target server. Both servers have entries about who shared with who.

However if anyone mounts a public link share on their ownCloud, the owner of the link share doesn't know about it because it really is "anonymously mounting". There is not much difference between mounting a link share and mounting an external storage.

Now there's an old unfinished PR here that could change that behavior and auto-convert mounted link shares to proper fed shares when possible: https://github.com/owncloud/core/pull/24771

Ah, thanks for explanation, got it now! I would support auto-converting mounted links to proper fed shares to come to a consistent behavior. What would you say? Doable for 10?

We can probably take over that PR and refresh it, but I'm worried about the potential sec issue. I'll ping @Peter-Prochaska there

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings