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

[BUG] External SFTP storage File ID collisions #41124

Open
jnweiger opened this issue Nov 21, 2023 · 5 comments
Open

[BUG] External SFTP storage File ID collisions #41124

jnweiger opened this issue Nov 21, 2023 · 5 comments

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Nov 21, 2023

Steps to reproduce

  1. at the server https://oc10133rc2-20231120.jw-qa.owncloud.works/ :
  2. user admin configures an external storage SFTP, avalable to all users.
  3. user admin enables users to mount external storages
  4. user alice mounts an external storage SFTPalice
  5. at an ios device
  6. connect client to https://oc10133rc2-20231120.jw-qa.owncloud.works/
  7. log in as user alice
  8. the toplevel folder list looks like this:
    grafik

Expected behavior

  • both storages, SFTP and SFTPalice should be there

Actual behavior

  • only SFTPalice is there

Client

iOS version:
17.1.1

ownCloud app version:
12.0.3

Device model:
iphone14 Pro Max

Server configuration

Web server:

Database:
postgresql 15

PHP version:
7.4

ownCloud version:
10.13.3-rc.2

Storage backend (external storage):
windows-network-drive 2.3.2

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Tell us what could be improved:

See also owncloud/android#4223

@GeraldLeikam this is what you found. correct?

@michaelstingl
Copy link

@GeraldLeikam this is what you found. correct?

Please provide app debug logs, with HTTP logs enabled. Here you can find more information:

@michaelstingl
Copy link

@jesmrec could you give it a quick try?

@jesmrec
Copy link

jesmrec commented Nov 21, 2023

@jesmrec could you give it a quick try?

yes, it's reproducible. As well as in Android case, PROPFIND response with the proper entry:

  <d:response>
    <d:href>/remote.php/dav/files/alice/SFTP/</d:href>
    <d:propstat>
      <d:prop>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:getlastmodified>Mon, 20 Nov 2023 18:45:59 GMT</d:getlastmodified>
        <d:getetag>&quot;655ba98aba5ff&quot;</d:getetag>
        <oc:id>00000242ocxtew3yl384</oc:id>
        <oc:size>125</oc:size>
        <oc:permissions>MCK</oc:permissions>
        <oc:favorite>0</oc:favorite>
        <oc:share-types/>
        <oc:owner-id>alice</oc:owner-id>
        <oc:owner-display-name>alice</oc:owner-display-name>
      </d:prop>

@GeraldLeikam
Copy link

Here is a log file form yesterday:

ownCloud_21.11.2023__19_55_40.log.txt

@felix-schwarz
Copy link

Thanks for the log.

The issue is caused by the server using the same File ID (00000242ocxtew3yl384) for both SFTPalice and SFTP, whereas every item is meant to have a unique File ID of its own:

<d:response>
	<d:href>/remote.php/dav/files/alice/SFTP/</d:href>
	<d:propstat>
		<d:prop>
			<d:resourcetype>
				<d:collection/>
			</d:resourcetype>
			<d:getlastmodified>Mon, 20 Nov 2023 18:45:59 GMT</d:getlastmodified>
			<d:getetag>&quot;655ba98aba5ff&quot;</d:getetag>
			<oc:id>00000242ocxtew3yl384</oc:id>
			<oc:size>125</oc:size>
			<oc:permissions>MCK</oc:permissions>
			<oc:favorite>0</oc:favorite>
			<oc:share-types/>
			<oc:owner-id>alice</oc:owner-id>
			<oc:owner-display-name>alice</oc:owner-display-name>
		</d:prop>
		<d:status>HTTP/1.1 200 OK</d:status>
	</d:propstat>
</d:response>
<d:response>
	<d:href>/remote.php/dav/files/alice/SFTPalice/</d:href>
	<d:propstat>
		<d:prop>
			<d:resourcetype>
				<d:collection/>
			</d:resourcetype>
			<d:getlastmodified>Mon, 20 Nov 2023 18:45:59 GMT</d:getlastmodified>
			<d:getetag>&quot;655ba98aba5ff&quot;</d:getetag>
			<oc:id>00000242ocxtew3yl384</oc:id>
			<oc:size>125</oc:size>
			<oc:permissions>MDNV</oc:permissions>
			<oc:favorite>0</oc:favorite>
			<oc:share-types/>
			<oc:owner-id>alice</oc:owner-id>
			<oc:owner-display-name>alice</oc:owner-display-name>
		</d:prop>
		<d:status>HTTP/1.1 200 OK</d:status>
	</d:propstat>
</d:response>

This therefore is not a client issue.

@michaelstingl michaelstingl changed the title [BUG] External storage 'SFTP' is not shown [BUG] External SFTP storage File ID collisions Nov 24, 2023
@michaelstingl michaelstingl transferred this issue from owncloud/ios-app Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants