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

Upload not blocked - File access control #3695

Closed
k1ngf15h3r opened this issue Mar 3, 2017 · 2 comments
Closed

Upload not blocked - File access control #3695

k1ngf15h3r opened this issue Mar 3, 2017 · 2 comments

Comments

@k1ngf15h3r
Copy link

Steps to reproduce

  1. Create a public upload folder (without file listing)
  2. Enable "file access control" and create rule to block access to "image/jpeg" and upload a jpeg file in publich folder
  3. jpeg file would be uploaded but could not be deleted inside NC

Expected behaviour

jpeg file should not be uplaoded with error message that jpeg files are not allowed

Actual behaviour

jpeg file will be uploaded but will be not accessable

Server configuration

Operating system:
Docker Image Nextcloud:10.0.3-apache

Web server:
Apache2

Database:
MySQL 10.1.20

PHP version:
PHP 5.6.30
Nextcloud version: (see Nextcloud admin page)
11.0.2 (stable)

Updated from an older Nextcloud/ownCloud or fresh install:
updated from 10.0.3

Where did you install Nextcloud from:
Docker Hub

@Schmuuu
Copy link

Schmuuu commented Mar 6, 2017

Hi,

I see the same problem that MIME types are not checked (correctly?) during the upload on public links. But as soon as the file is uploaded, file access control denies the access.
However, if you want to grant access to the file for the normal user (that shared the link), you can modify the rule a little bit.

For example:

  • file mime type -- is -- JPEG
  • user group membership -- not member of -- normalUser

So if the user is member of the group "normalUser", then he can still access the file and delete it.

Nevertheless I would love to have the file access control also working for uploads to a public link.
I wanted to forbid uploads of *.sh, *.php and *.js but can't get this to work.

My NC version is 11.0.2 by the way.

@nickvergessen
Copy link
Member

Duplicate of nextcloud/files_accesscontrol#55

Fix is in #3725

Problem is public shares use a different endpoint where the mimetype was always detected as ''

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

3 participants