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

[stable9] Fix LDAP race conditions #24242

Merged
merged 1 commit into from
Apr 26, 2016
Merged

Conversation

MorrisJobke
Copy link
Contributor

* getFromCache is wrapped in isCached
* inbetween the two calls the cache entry hits it's TTL
* getFromCache returns null
* this fix only checkes if the returned value is null and
  return only non-null values
@MorrisJobke MorrisJobke added this to the 9.0.2-current-maintenance milestone Apr 25, 2016
@MorrisJobke
Copy link
Contributor Author

cc @blizzz @nickvergessen @LukasReschke @davitol @owncloud/qa @owncloud/ldap We need some LDAP testing here.

@MorrisJobke
Copy link
Contributor Author

The login fails for an AD server:

{"reqId":"3Ib70gzEQ00QLlWXmfqQ","remoteAddr":"92.206.40.223","app":"PHP","message":"Call to a member function getFileInfo() on a non-object at \/opt\/owncloud\/lib\/private\/files\/filesystem.php#869","level":3,"time":"2016-04-25T13:57:25+00:00","method":"GET","url":"\/index.php\/apps\/files\/","user":"--"}

cc @davitol @blizzz

@MorrisJobke
Copy link
Contributor Author

Stack trace:

{
    "reqId":"MBAlJGg/ZFD8TjYojPn7",
    "remoteAddr":"92.206.40.223",
    "app":"no app in context",
    "message":"Exception:
    {
    "Exception":"Exception",
    "Message":"",
    "Code":0,
    "Trace":"
        #0 /opt/owncloud/apps/files/controller/viewcontroller.php(110): OC\Files\Filesystem::getFileInfo('/', false)
        #1 /opt/owncloud/apps/files/controller/viewcontroller.php(174): OCA\Files\Controller\ViewController->getStorageInfo()
        #2 [internal function]: OCA\Files\Controller\ViewController->index('', '')
        #3 /opt/owncloud/lib/private/appframework/http/dispatcher.php(159): call_user_func_array(Array, Array)
        #4 /opt/owncloud/lib/private/appframework/http/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files\Controller\ViewController), 'index')
        #5 /opt/owncloud/lib/private/appframework/app.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files\Controller\ViewController), 'index')
        #6 /opt/owncloud/lib/private/appframework/routing/routeactionhandler.php(45): OC\AppFramework\App::main('ViewController', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
        #7 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)
        #8 /opt/owncloud/lib/private/route/router.php(276): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)
        #9 /opt/owncloud/lib/base.php(882): OC\Route\Router->match('/apps/files/')
        #10 /opt/owncloud/index.php(39): OC::handleRequest()
        #11 {main}",
    "File":"/opt/owncloud/lib/private/files/filesystem.php",
    "Line":869}",
    "level":3,
    "time":"2016-04-25T13:59:39+00:00",
    "method":"GET",
    "url":"/index.php/apps/files/",
    "user":"--"
}
{
    "reqId":"MBAlJGg/ZFD8TjYojPn7",
    "remoteAddr":"92.206.40.223",
    "app":"PHP",
    "message":"Call to a member function getFileInfo() on a non-object at /opt/owncloud/lib/private/files/filesystem.php#870",
    "level":3,
    "time":"2016-04-25T13:59:39+00:00",
    "method":"GET",
    "url":"/index.php/apps/files/",
    "user":"--"
}

@MorrisJobke
Copy link
Contributor Author

Maybe it's caused by a somehow wrongly setup AD? cc @davitol

@blizzz
Copy link
Contributor

blizzz commented Apr 25, 2016

AD login works for me

@blizzz
Copy link
Contributor

blizzz commented Apr 25, 2016

The backtrace is file/storage related. Maybe some remnants from another test case?

@blizzz
Copy link
Contributor

blizzz commented Apr 25, 2016

Looks good and works for me 👍

@davitol
Copy link
Contributor

davitol commented Apr 26, 2016

The backtrace is file/storage related. Maybe some remnants from another test case?

It was a fresh installation for this test.

Maybe it's caused by a somehow wrongly setup AD?

Same AD configuration in another server without the patch let me to log in with my AD user.

Let me test this patch again and i`ll tell you the results

@MorrisJobke
Copy link
Contributor Author

Let me test this patch again and i`ll tell you the results

And hand over the credentials for this machine. Then I will try to bisect this.

@davitol
Copy link
Contributor

davitol commented Apr 26, 2016

@MorrisJobke @blizzz I have reboot the machine of the AD server, and now it works perfect with the patch too. 👍

@davitol davitol added the tested label Apr 26, 2016
@DeepDiver1975 DeepDiver1975 merged commit 80a31b7 into stable9 Apr 26, 2016
@DeepDiver1975 DeepDiver1975 deleted the stable9-backport-24052 branch April 26, 2016 12:34
@lock
Copy link

lock bot commented Aug 6, 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 Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants