owncloud / owncloud/ocis

A User can get information of another user with Graph API

Open
#5,125 2 comments 0 reactions 0 assignees View on GitHub
Priority:p3-medium Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

### Description
With `Graph API` a user can get information of another user with username of another user.

### Steps to reproduce
1. Create `user1` and `user2`

#### Curl command to get user information
```
curl -X GET -vk -u user1:123456 https://host.docker.internal:9200/graph/v1.0/users/user2
```

### Expected Behaviour
`user1` should not be albe to get the information of another user `user2`

### Actual Behaviour with the curl request
```
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: O=Acme Corp; CN=OCIS
* start date: Nov 25 08:23:00 2022 GMT
* expire date: Nov 25 08:23:00 2023 GMT
* issuer: O=Acme Corp; CN=OCIS
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'user1'
} [5 bytes data]
> GET /graph/v1.0/users/user2 HTTP/1.1
> Host: host.docker.internal:9200
> Authorization: Basic dXNlcjE6MTIzNDU2
> User-Agent: curl/7.68.0
> Accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [130 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 135
< Content-Type: application/json; charset=utf-8
< Date: Fri, 25 Nov 2022 08:34:44 GMT
< X-Graph-Version: 2.0.0-rc.1+b4e727b60
<
{ [135 bytes data]
100 135 100 135 0 0 3000 0 --:--:-- --:--:-- --:--:-- 3000
* Connection #0 to host host.docker.internal left intact
{
"displayName": "user2 gurung",
"id": "205ccfc7-3c37-46aa-9339-d7dc2ad5e362",
"mail": "user2@gmail.com",
"onPremisesSamAccountName": "user2"
}

```

### Environment
`oCIS` latest docker image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.