Skip to content

use bit operators when checking file permission, resolves #36025#36111

Merged
micbar merged 1 commit intomasterfrom
fix-36025
Aug 29, 2019
Merged

use bit operators when checking file permission, resolves #36025#36111
micbar merged 1 commit intomasterfrom
fix-36025

Conversation

@karakayasemi
Copy link
Copy Markdown
Contributor

@karakayasemi karakayasemi commented Aug 28, 2019

Description

This PR corrects readability control in View. You can not use && operator when checking share permissions, use & (bitwise AND) instead.

Related Issue

Motivation and Context

Fixing bugs.

How Has This Been Tested?

  • share a file with permission=2 to a user. curl --user admin:admin "http://localhost/owncloud-core/ocs/v1.php/apps/files_sharing/api/v1/shares" --data 'path=/data.zip&shareType=0&shareWith=uu1&permissions=2'
  • as receiver open the webUI
  • webUI should work OK and the file should not be visible in file list.

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:

@karakayasemi karakayasemi changed the title use bit operator when checking share permission, resolves #36025 use bit operators when checking file permission, resolves #36025 Aug 28, 2019
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 28, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #36111   +/-   ##
=======================================
  Coverage      54%      54%           
=======================================
  Files          63       63           
  Lines        7403     7403           
  Branches     1308     1308           
=======================================
  Hits         3998     3998           
  Misses       3019     3019           
  Partials      386      386
Flag Coverage Δ
#javascript 54% <ø> (ø) ⬆️

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 0856f5c...3524305. Read the comment docs.

1 similar comment
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 28, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #36111   +/-   ##
=======================================
  Coverage      54%      54%           
=======================================
  Files          63       63           
  Lines        7403     7403           
  Branches     1308     1308           
=======================================
  Hits         3998     3998           
  Misses       3019     3019           
  Partials      386      386
Flag Coverage Δ
#javascript 54% <ø> (ø) ⬆️

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 0856f5c...3524305. Read the comment docs.

@micbar micbar merged commit 99fd119 into master Aug 29, 2019
@delete-merged-branch delete-merged-branch Bot deleted the fix-36025 branch August 29, 2019 11:50
@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.

receiving a file share with permission=2 locks the webUI

4 participants