Skip to content

Commit

Permalink
Parse URL path to determine file name (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 authored Dec 9, 2021
1 parent 68b64bf commit 2f727fc
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/fix-content-disposition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Bugfix: Fix content disposition header for public links files

https://github.com/cs3org/reva/pull/2303
https://github.com/cs3org/reva/pull/2297
https://github.com/cs3org/reva/pull/2332
https://github.com/cs3org/reva/pull/2332
https://github.com/cs3org/reva/pull/2346
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "oidcmapping"
linkTitle: "oidcmapping"
weight: 10
description: >
Configuration for the oidcmapping service
---

# _struct: config_

{{% dir name="insecure" type="bool" default=false %}}
Whether to skip certificate checks when sending requests. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L57)
{{< highlight toml >}}
[auth.manager.oidcmapping]
insecure = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="issuer" type="string" default="" %}}
The issuer of the OIDC token. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L58)
{{< highlight toml >}}
[auth.manager.oidcmapping]
issuer = ""
{{< /highlight >}}
{{% /dir %}}

{{% dir name="id_claim" type="string" default="sub" %}}
The claim containing the ID of the user. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L59)
{{< highlight toml >}}
[auth.manager.oidcmapping]
id_claim = "sub"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="uid_claim" type="string" default="" %}}
The claim containing the UID of the user. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L60)
{{< highlight toml >}}
[auth.manager.oidcmapping]
uid_claim = ""
{{< /highlight >}}
{{% /dir %}}

{{% dir name="gid_claim" type="string" default="" %}}
The claim containing the GID of the user. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L61)
{{< highlight toml >}}
[auth.manager.oidcmapping]
gid_claim = ""
{{< /highlight >}}
{{% /dir %}}

{{% dir name="userprovidersvc" type="string" default="" %}}
The endpoint at which the GRPC userprovider is exposed. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L62)
{{< highlight toml >}}
[auth.manager.oidcmapping]
userprovidersvc = ""
{{< /highlight >}}
{{% /dir %}}

{{% dir name="usersmapping" type="string" default="" %}}
The OIDC users mapping file path [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/auth/manager/oidcmapping/oidcmapping.go#L63)
{{< highlight toml >}}
[auth.manager.oidcmapping]
usersmapping = ""
{{< /highlight >}}
{{% /dir %}}

2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *svc) handleGet(ctx context.Context, w http.ResponseWriter, r *http.Requ

w.Header().Set(HeaderContentType, info.MimeType)
w.Header().Set(HeaderContentDisposistion, "attachment; filename*=UTF-8''"+
path.Base(r.RequestURI)+"; filename=\""+path.Base(r.RequestURI)+"\"")
path.Base(r.URL.Path)+"; filename=\""+path.Base(r.URL.Path)+"\"")
w.Header().Set(HeaderETag, info.Etag)
w.Header().Set(HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id))
w.Header().Set(HeaderOCETag, info.Etag)
Expand Down

0 comments on commit 2f727fc

Please sign in to comment.