401 responses on filtered page for anonymous user

Open
#6,055 4 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@alexklbuckley is already working on this.

Since Aug 5, 2026.

Assessment

This issue has not been assessed yet.

Description

authentication: general bug code task error handling

Describe the bug

When I visit a browse by page (eg. https://demo.dspace.org/browse/dateissued?bbm.page=1&startsWith=2023) and open the developer tools, I see multiple requests that result in 401 responses. I assume they are related to features only an admin should be able to access. These requests should not be made, there should be a check in place that only authorized users fire these requests.

Image

Failing requests were observed on these paths:
/server/api/system/scripts/metadata-import
/server/api/system/scripts/metadata-export

The bug is present in both DSpace 9.3. and 10.

To Reproduce

Steps to reproduce the behavior:

  1. Open https://demo.dspace.org/browse/dateissued?bbm.page=1&startsWith=2023 as an anonymous user
  2. Open the dev tools and the console or network tab and observe the failed requests

Note: This does not happen everytime, likely because of a race condition with observables in the frontend code. Just try it out several times.

Expected behavior

When visiting browse-by pages as an anonymous user, I don't encounter 401 errors/responses.

Related work

Similar to https://github.com/DSpace/dspace-angular/issues/5931, fix is here: https://github.com/DSpace/dspace-angular/pull/5932

Dominant language
TypeScript
Stars
180
Forks
577
Avg merge
2d 1h
Merged PRs (30d)
100

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DSpace/dspace-angular

All issues in DSpace/dspace-angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.