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

After upgrade to 10.0.7, user cannot log-in anymore #30792

Closed
kerner1000 opened this issue Mar 15, 2018 · 11 comments
Closed

After upgrade to 10.0.7, user cannot log-in anymore #30792

kerner1000 opened this issue Mar 15, 2018 · 11 comments

Comments

@kerner1000
Copy link

kerner1000 commented Mar 15, 2018

Steps to reproduce

Currently, this is not 100% reproducible, since it is not happening for all users.

Expected behaviour

ownCloud client cannot connect.
Website shows error.

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

Web server:

$ apache2 -version
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2017-09-18T15:09:02

Database:

$ mysql -V      
mysql  Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using  EditLine wrapper

PHP version:

$ php -v
PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

ownCloud version: (see ownCloud admin page)

10.0.7

Updated from an older ownCloud or fresh install:

Upgrade from ??

Where did you install ownCloud from:

https://download.owncloud.org/community/owncloud-10.0.7.tar.bz2

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

# sudo -u www-data php occ config:list system
{
    "system": {
        "instanceid": "ocs9vyuvehvx",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "owncloud.lablicate.com"
        ],
        "datadirectory": "\/var\/data\/owncloud-intern",
        "overwrite.cli.url": "https:\/\/owncloud.lablicate.com",
        "dbtype": "mysql",
        "version": "10.0.7.2",
        "dbname": "owncloud-intern",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2
    }
}

List of activated apps:

# sudo -u www-data php occ app:list
Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.3
  - notifications: 0.3.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.2
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - theme-example
  - user_external

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

No.

Are you using encryption: yes/no

No.

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

No.

Client configuration

Browser:

Current Firefox.

Operating system:

Logs

Web server error log

less /var/log/apache2/error.log
[core:notice] [pid 1851] AH00094: Command line: '/usr/sbin/apache2'

ownCloud log (data/owncloud.log)

`{"reqId":"sArpzpiZeQNBljtLy6Op","level":3,"time":"2018-03-15T11:55:10+00:00","remoteAddr":"84.133.174.131","user":"--","app":"index","method":"POST","url":"\/index.php\/login","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"
#0 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Entity.php(70): OC\\\\Authentication\\\\Token\\\\DefaultToken->setName('')\\n
#1 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/Authentication\\\/Token\\\/DefaultTokenMapper.php(84): OCP\\\\AppFramework\\\\Db\\\\Entity::fromRow(Array)\\n
#2 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/Authentication\\\/Token\\\/DefaultTokenProvider.php(148): OC\\\\Authentication\\\\Token\\\\DefaultTokenMapper->getToken(*** sensitive parameters replaced ***)\\n
#3 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/User\\\/Session.php(664): OC\\\\Authentication\\\\Token\\\\DefaultTokenProvider->getToken(*** sensitive parameters replaced ***)\\n
#4 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/User\\\/Session.php(297): OC\\\\User\\\\Session->validateToken(*** sensitive parameters replaced ***)\\n
#5 \\\/var\\\/www\\\/owncloud-intern\\\/core\\\/Controller\\\/LoginController.php(201): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n
#6 [internal function]: OC\\\\Core\\\\Controller\\\\LoginController->tryLogin(*** sensitive parameters replaced ***)\\n
#7 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n
#8 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n
#9 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/AppFramework\\\/App.php(103): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n
#10 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('LoginController', 'tryLogin', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n
#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n
#12 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n
#13 \\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/base.php(913): OC\\\\Route\\\\Router->match('\\\/login')\\n
#14 \\\/var\\\/www\\\/owncloud-intern\\\/index.php(55): OC::handleRequest()\\n
#15 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud-intern\\\/lib\\\/private\\\/Authentication\\\/Token\\\/DefaultToken.php\",\"Line\":139}"}`
@kerner1000 kerner1000 changed the title After upgrade to 10.07, one user cannot log-in anymore After upgrade to 10.0.7, one user cannot log-in anymore Mar 15, 2018
@kerner1000 kerner1000 changed the title After upgrade to 10.0.7, one user cannot log-in anymore After upgrade to 10.0.7, user cannot log-in anymore Mar 15, 2018
@PVince81
Copy link
Contributor

Looks like something is trying to set the token name to empty string, which is invalid now.

The empty name check is usually for when the token is created from the web UI, not sure why it's happening at login time ?!

@DeepDiver1975 @IljaN

@PVince81 PVince81 added this to the triage milestone Mar 15, 2018
@owncloud owncloud deleted a comment from ownclouders Mar 15, 2018
@kerner1000
Copy link
Author

is there some workaround for this issue?

@PVince81
Copy link
Contributor

You can set an arbitrary value in the name field in the oc_authtoken table where the name is empty.

@PVince81 PVince81 added Type:Bug blue-ticket p2-high Escalation, on top of current planning, release blocker and removed bug-analysis labels Mar 16, 2018
@PVince81
Copy link
Contributor

@DeepDiver1975 can you take care ?

@PVince81
Copy link
Contributor

I suggest that in the database accessor if we find an empty token name we just automatically fill it in with "(none)" so the rest of the code doesn't fail.

@kerner1000
Copy link
Author

kerner1000 commented Mar 16, 2018

@PVince81 thanks, can you give me some hint how to do that? Are you speaking of the database?

@PVince81
Copy link
Contributor

@kerner1000 update oc_authtoken set name='(none)' where type=1 and (name is null or name='');

IljaN added a commit that referenced this issue Mar 26, 2018
DeepDiver1975 added a commit that referenced this issue Mar 26, 2018
…names

[stable10] Set empty authtoken names to 'none' #30792
@felixboehm
Copy link
Contributor

@felixboehm felixboehm modified the milestones: development, planned Apr 10, 2018
@felixboehm
Copy link
Contributor

@kerner1000 please test again with 10.0.8, fix #30815 should help.
Currently we provide 10.0.8 release candidate:
https://central.owncloud.org/t/owncloud-server-10-0-8-rc3/13085

@felixboehm felixboehm added p3-medium Normal priority and removed blue-ticket p2-high Escalation, on top of current planning, release blocker labels Apr 19, 2018
@DeepDiver1975
Copy link
Member

we can close this because this is fixed

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants