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

Mountpoint collision #36029

Merged
merged 3 commits into from
Aug 22, 2019
Merged

Mountpoint collision #36029

merged 3 commits into from
Aug 22, 2019

Conversation

jvillafanez
Copy link
Member

@jvillafanez jvillafanez commented Aug 14, 2019

Description

Check that all user mount points has unique names. Superseeds #35319

Related Issue

#35154

Motivation and Context

How Has This Been Tested?

automatically tested plus manually also:

  1. create "folder1" with "user1" in server A
  2. create "folder1" with the admin, and share it with "user1" (in server A)
  3. in server B, create "folder1" with the admin, and share it remotelly with "user1@serverA"
  4. in server A, with "user1", accept the shares
  5. check that "user1" has access to the 3 different folders.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@jvillafanez
Copy link
Member Author

I'm not able to run properly the acceptance tests in order to fix the error in the tests:

    Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"                    # FederationContext::userFromServerHasSharedWithUserFromServer()
      Could not share file/folder! message: "cURL error 60: SSL certificate problem: self signed certificate"
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'100'
      +'403'

Although https is available, tests should already be configured to run through http, so this ssl problem shouldn't happen.

The problem seems to be around https://github.com/owncloud/core/blob/master/apps/federatedfilesharing/lib/Notifications.php#L323 , where the method always prioritize https. Note that the "shareWith" user has explicit http protocol ("user0@http://server/")

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #36029 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #36029   +/-   ##
=======================================
  Coverage   53.85%   53.85%           
=======================================
  Files          63       63           
  Lines        7377     7377           
  Branches     1301     1301           
=======================================
  Hits         3973     3973           
  Misses       3019     3019           
  Partials      385      385
Flag Coverage Δ
#javascript 53.85% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c23088...098ea19. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #36029 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #36029   +/-   ##
=======================================
  Coverage   53.85%   53.85%           
=======================================
  Files          63       63           
  Lines        7377     7377           
  Branches     1301     1301           
=======================================
  Hits         3973     3973           
  Misses       3019     3019           
  Partials      385      385
Flag Coverage Δ
#javascript 53.85% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7407170...b5745d8. Read the comment docs.

@jvillafanez
Copy link
Member Author

Opened #36035 for the ssl problem. Meanwhile, I've changed https://github.com/owncloud/core/blob/master/apps/federatedfilesharing/lib/Notifications.php#L325 to use http instead in my local environment. Tests should pass now.

@jvillafanez
Copy link
Member Author

This is ready to review. Maybe @VicDeo can check my changes. There are quite a bunch of things that I don't like, but I just focused on making the tests pass. Any change aiming to improve the code is welcomed.

Copy link
Member

@VicDeo VicDeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@VicDeo
Copy link
Member

VicDeo commented Aug 21, 2019

@jvillafanez looks good. Should we squash the history?

@jvillafanez
Copy link
Member Author

@jvillafanez looks good. Should we squash the history?

Up to you.

@VicDeo
Copy link
Member

VicDeo commented Aug 21, 2019

squashed

@VicDeo VicDeo merged commit 5c15243 into master Aug 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the mountpoint_collision branch August 22, 2019 08:01
@davitol davitol mentioned this pull request Sep 3, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants