Skip to content

Pyocclient and NC 13 don't error on false login #13561

@tflidd

Description

@tflidd

Steps to reproduce

  1. Get pyocclient
  2. Try connect to your Nextcloud with wrong credentials
import owncloud
oc = owncloud.Client("https://example.org/nextcloud")
oc.login("non-existing-user", "randomPw")

Expected behaviour

Like for ownCloud, I expect a 401 authentication error.

Actual behaviour

Nothing, you can't tell if the login was successful or not.

The login()-procedure tries to gather the capabilities of the server, that is where the ownCloud server throws an error, Nextcloud just returns a result:

{'bruteforce': {'delay': '400'},
 'theming': {'background': 'https://example.org/nextcloud/core/img/background.png?v=3',
  'background-default': '1',
  'background-plain': None,
  'color': '#057BC9',
  'color-element': '#057BC9',
  'color-text': '#ffffff',
  'logo': 'https://example.org/nextcloud/core/img/logo.svg?v=3',
  'name': 'Nextcloud',
  'slogan': 'a safe home for all your data',
  'url': 'https://nextcloud.com'}}

Is there a reason why this information is available without authentication? It does not seem to include useful information for unauthenticated access like if federated sharing or something is supported.

Nextcloud version: NC 13.0.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbugneeds info

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions