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

implement if-match check in storageprovider #2547

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

C0rby
Copy link
Contributor

@C0rby C0rby commented Feb 15, 2022

Implement a check for the if-match value in InitiateFileUpload to prevent overwrites of newer versions.

Implements this feature: owncloud/ocis#3174

@C0rby C0rby self-assigned this Feb 15, 2022
@C0rby C0rby marked this pull request as draft February 17, 2022 11:40
@C0rby C0rby marked this pull request as ready for review February 17, 2022 16:15

switch sRes.Status.Code {
case rpc.Code_CODE_OK:
if sRes.Info.Etag != req.GetIfMatch() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why we are calling req.GetIfMatch() again instead of using ifMatch variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch! 👍

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

Successfully merging this pull request may close these issues.

3 participants