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

Security problem / sharing options #8028

Closed
MathiasPhilipp opened this issue Jan 24, 2018 · 6 comments
Closed

Security problem / sharing options #8028

MathiasPhilipp opened this issue Jan 24, 2018 · 6 comments

Comments

@MathiasPhilipp
Copy link

MathiasPhilipp commented Jan 24, 2018

I'm not a developer and absolutely new here. I'm admin and user, never worked with github. Sorry if I do anything wrong or at the wrong place.

In my opinion, the following seems to be a security problem:

Combining the options
"Restrict users to share only with users in their group"
and
"Allow username autocompletion in share dialog." If this is disabled
the full username or email address needs to be entered "

If I enter the username with autocomplete when sharing, all hits for all users over all groups are displayed. Also the users of groups with whom I may not allowed to share. With it I can find out all users (with email) about all groups.

I would expect autocomplete to show me only the users I'm allowed to share.

Is this a security bug or how can I prevent it?

Steps to reproduce

  1. enable "Restrict users to share only with users in their group"
  2. enable "Allow username autocompletion in share dialog..."
  3. share

Expected behaviour

I would expect autocomplete to show me only the users I'm allowed to share.

Actual behaviour

all hits for all users over all groups are displayed. Also the users of groups with whom I may not allowed to share.

Server configuration

Operating system: ? web-hosting

Web server: ?? web-hosting

Database: MYSQL 5.7.20

PHP version: 7.2.1

Nextcloud version: 12.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updeted from Nextcloud

Where did you install Nextcloud from: web-hosting

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@tflidd
Copy link
Contributor

tflidd commented Jan 27, 2018

It was already part of this request (if I don't misread it: #5107) which was set to the Nextcloud 13 milestone. The discussion was more related about the contacts menu.

this point in #5107 seems still to be an issue:

If sharing is restricted to users own groups, he should only see contacts from his groups:

@LEDfan did your implementation (PR #5585) only consider the contacts menu but not the sharing menu?

I can reproduce this problem in NC 13 beta 3.

@tflidd
Copy link
Contributor

tflidd commented Jan 27, 2018

is this the same?
#6530

@MathiasPhilipp
Copy link
Author

MathiasPhilipp commented Jan 28, 2018 via email

@MathiasPhilipp
Copy link
Author

MathiasPhilipp commented Jan 28, 2018 via email

@tflidd
Copy link
Contributor

tflidd commented Jan 28, 2018

After update 12.0.4. to 12.0.5. the sharing problem is already solved. I can’t reproduce the security problem. From my point of view it’s fixed.

Except that it is broken for NC 13 RC 3 again....

@tflidd tflidd added this to the Nextcloud 13 milestone Jan 28, 2018
@LEDfan
Copy link
Member

LEDfan commented Jan 29, 2018

After update 12.0.4. to 12.0.5. the sharing problem is already solved.

This bug is the same as in #7428 and #6530 which is fixed in 12.0.5.

I can reproduce this problem in NC 13 beta 3.

The fix was merged into beta 4, I just tested on stable13 and there it's still fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants