Skip to content

Commit

Permalink
Only use access token if not public token
Browse files Browse the repository at this point in the history
So that we do not become the user in public links, which would generate wrong requests when a user is logged in.
Reported in owncloud#8486
  • Loading branch information
diocas committed Jun 1, 2023
1 parent 1c4c93d commit a5b1717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web-pkg/src/composables/authContext/useRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function useRequest(options: RequestOptions = {}): RequestResult {
config: AxiosRequestConfig = {}
): Promise<AxiosResponse> => {
let httpClient
if (unref(accessToken)) {
if (!unref(publicToken) && unref(accessToken)) {
httpClient = clientService.httpAuthenticated(unref(accessToken))
} else {
httpClient = clientService.httpUnAuthenticated
Expand Down

0 comments on commit a5b1717

Please sign in to comment.