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

Don't create stripped account #136

Closed
Thom1b opened this issue Apr 8, 2020 · 2 comments
Closed

Don't create stripped account #136

Thom1b opened this issue Apr 8, 2020 · 2 comments
Labels
0. Needs triage bug Something isn't working

Comments

@Thom1b
Copy link

Thom1b commented Apr 8, 2020

Steps to reproduce

  1. Login as "user1" instead of "[email protected]"

Expected behaviour

Deny "user1" to login

Actual behaviour

Nextcloud creates a "user1" database account

Affected Authentication backend

IMAP backend with "strip domain part" setting to false

My user_external config

$CONFIG = array (
'user_backends' =>
array (
0 =>
array (
'class' => 'OC_User_IMAP',
'arguments' =>
array (
0 => 'localhost',
1 => 143,
2 => NULL,
3 => 'example.org',
4 => false,
),
),
),
);

Server configuration

User External App version: (see Nextcloud apps page)
0.9.0

Operating system:
Slackware Linux

Web server:
nginx-1.16.1

Database:
Mariadb

PHP version:
7.3.16

Nextcloud version: (see Nextcloud admin page)
17.0.5.

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

Where did you install Nextcloud from:
From official tarball

As you can see I set up "strip domain part" to false. So my IMAP users accounts are like "[email protected]" in nextcloud, etc. "user1" account doesn't exist but if "[email protected]" tries to login as "user1" instead of "[email protected]", "user1" database account is created instead of deny it to login.

I think this is a bug in user_external because with "user_external" disabled, nextcloud denies the user to login.
Anyway, is there a way to deny imap users to login with only the first part of their imap address?

Thanks, have a nice day!

@Thom1b Thom1b added 0. Needs triage bug Something isn't working labels Apr 8, 2020
@violoncelloCH
Copy link
Member

Thanks, closing this as duplicate of #128

@j0rgan
Copy link

j0rgan commented Mar 27, 2022

This is still an issue when trying to connect via caldav. Although it denies the login, the account is created. Steps to reproduce:

  • configure as intended
  • try to sync calendar (with iCal for example)

The apple ical will assume it is allowed to login, and then it will attempt to sync. It will not sync, however new account with stripped domain is created. Same for syncing carddav.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants