Skip to content

Throw exception in initMountPoints if user manager returned null #13862

Closed

Description

@PVince81

If for some reason the user manager did not find the expected user here https://github.com/owncloud/core/blob/stable7/lib/private/files/filesystem.php#L332 the logic will still go in the else block and create a bogus "local::" home entry.

This code needs to be made more robust: add a check whether $user is non-null and non-empty and if $userObject is null, which means that the user manager did not find the user, just throw an exception. This will avoid unwanted side-effects.
See #12801 (comment) where this was found

CC @icewind1991 @blizzz

Activity

  1. added this to the milestone on Feb 3, 2015
  2. PVince81 commented on Feb 26, 2015

    @PVince81
    ContributorAuthor

    PR is here: #14044

    This is not technically a bugfix, only something to make the code more robust in case of unknown bugs triggering that code path.

    @DeepDiver1975 moving to 8.1

  3. modified the milestones: , on Feb 26, 2015
  4. PVince81 commented on Feb 26, 2015

    @PVince81
    ContributorAuthor

    (the part that was known to trigger that code path was fixed already in stable7 + stable8: #12801)

  5. MorrisJobke commented on Apr 2, 2015

    @MorrisJobke
    Contributor

    Fix is in #15332

  6. PVince81 commented on Apr 23, 2015

    @PVince81
    ContributorAuthor

    Closing as the PRs have been merged.

  7. locked as resolved and limited conversation to collaborators on Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions