Skip to content

ocs status code 997 is not mapped to http code on v2.php #32068

Open
@individual-it

Description

@individual-it

Steps to reproduce

  1. create user "uu1"
  2. disable user "uu1"
  3. try to create a share as user "uu1" curl -u uu1:uu1 -v http://localhost/owncloud-core/ocs/v2.php/apps/files_sharing/api/v1/shares -d "path=welcome.txt&shareWith=admin&shareType=0"

Expected behaviour

OSC status code should be the same as HTTP status code when using v2.php

Actual behaviour

OCS status code is 997

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>997</statuscode>
  <message>Unauthorised</message>
 </meta>
 <data/>
</ocs>

see https://github.com/owncloud/core/blob/master/lib/private/legacy/api.php#L503-L505

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions