smb login improperly escapes username

Open
#18 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

Start with the SMB login backend of user_external and reproduce the failure using the documented Samba usernames, especially the address containing "@". Compare the failing login with the working "myuser" case; the issue is done when the documented external login succeeds for "myuser@something.com" without regressing the simpler username.

Written by the indexing model from the issue text.

Description

0. Needs triage bug
Affected apps

This afflicts the smb login backend of user_external. It also applies to external storage so I'm not sure where to post this.

Expected behaviour

Use the Samba user "myuser@something.com" to login to NextCloud.

Actual behaviour

Login fails because the username is improperly escaped (I assume) and so the "@" causes it to fail. The login works fine with the (separately added) user "myuser."

Steps to reproduce
  1. Set up Samba
  2. smbpasswd -a "myuser@something.com", smbpasswd -a "myuser"
  3. Set password
  4. Try login from connected NextCloud. "myuser" works, "myuser@something.com" doesn't.
Server configuration

NGINX: nginx/1.10.3

PHP
Version: 7.1.2
Memory Limit: 512.0 MB
Max Execution Time: 10800
Upload max size: 10.0 GB

Database
Type: mysql
Version: 10.1.21
Size:

NextCloud version: 11.0.2.7

Logs
Web server error log
Nothing - though that might be down to container settings
ownCloud log (data/owncloud.log)
{"reqId":"t13LpmruSZpw0FvUqaQ1","remoteAddr":"192.168.3.87","app":"core","message":"Login failed: 'myuser@something.com' (Remote IP: '192.168.3.87')","level":2,"time":"2017-03-13 12:25:26","method":"POST","url":"\/login?user=myuser%40something.com","user":"--","ver
sion":"11.0.2.7"}
Dominant language
JavaScript
Stars
120
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/user_external

All issues in nextcloud/user_external

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.