Skip to content

[Share 2.0] Additional checks for share object creation - #21755

Merged
DeepDiver1975 merged 1 commit into
masterfrom
share2_hardening_creation
Jan 18, 2016
Merged

DeepDiver1975 merged 1 commit into
masterfrom
share2_hardening_creation

Conversation

@rullzer

@rullzer rullzer commented Jan 15, 2016

Copy link
Copy Markdown
Contributor
  • We can't assume that the file still exists
  • We can't assume that the user/group still exists

Basically we do not always nicely cleanup shares.

CC: @schiesbn @nickvergessen @DeepDiver1975 @PVince81

@rullzer rullzer added this to the 9.0-current milestone Jan 15, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @DeepDiver1975 to be a potential reviewer

@rullzer
rullzer force-pushed the share2_hardening_creation branch from 44d9f6a to 122a83c Compare January 16, 2016 13:08
@rullzer rullzer mentioned this pull request Jan 16, 2016
@PVince81

Copy link
Copy Markdown
Contributor

👍 code makes sense

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this results in an empty OCS body, kind of suboptimal, although it shouldn't happen ever

curl http://localhost/ocs/v1.php/apps/files_sharing/api/v1/shares -X POST -d 'shareType=0&shareWith=test2&path=foo'
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>403</statuscode>
  <message></message>
 </meta>
 <data/>
</ocs>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mmm uhm we could add extra info... but I plan to add a logger to the provider soon to log all things that can go wrong... if this happens to a user I'm not sure what to report back that will make any sense to them..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

User does not exist anymore?

@nickvergessen

Copy link
Copy Markdown
Contributor

Anyway, fine by me 👍

* We can't assume that the file still exists
* We can't assume that the user/group still exists

Basically we do not always nicely cleanup shares.
@rullzer
rullzer force-pushed the share2_hardening_creation branch from 122a83c to 0939520 Compare January 18, 2016 19:00
DeepDiver1975 added a commit that referenced this pull request Jan 18, 2016
[Share 2.0] Additional checks for share object creation
@DeepDiver1975
DeepDiver1975 merged commit d7729a8 into master Jan 18, 2016
@DeepDiver1975
DeepDiver1975 deleted the share2_hardening_creation branch January 18, 2016 21:11
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants