Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed OAI-PMH requests generate an internal server error #9275

Closed
claudiodsf opened this issue Jan 11, 2023 · 5 comments · Fixed by #10205
Closed

Malformed OAI-PMH requests generate an internal server error #9275

claudiodsf opened this issue Jan 11, 2023 · 5 comments · Fixed by #10205
Labels
Feature: Harvesting Size: 10 A percentage of a sprint. 7 hours. Type: Bug a defect User Role: API User Makes use of APIs
Milestone

Comments

@claudiodsf
Copy link
Contributor

claudiodsf commented Jan 11, 2023

What steps does it take to reproduce the issue?

Try a malformed request, like, e.g., without any keyword:

https://demo.dataverse.org/oai

Or with a bad keyword:

https://demo.dataverse.org/oai?key=value

  • When does this issue occur?

Always

  • Which page(s) does it occurs on?

OAI-PMH protocol

  • What happens?

The bad request generates an "Internal Server Error"

  • To whom does it occur (all users, curators, superusers)?

All users

  • What did you expect to happen?

The client should get an XML response with an error message from the OAI-PMH protocol.

This used to work on old version of Dataverse, example:

https://entrepot.recherche.data.gouv.fr/oai

https://entrepot.recherche.data.gouv.fr/oai?key=value

(The installation in the example runs Dataverse 5.3)

Which version of Dataverse are you using?

5.12, 5.12.1

Any related open or closed issues to this bug report?

Screenshots:

@landreev
Copy link
Contributor

Sure, we will fix this.

@poikilotherm
Copy link
Contributor

I am pretty sure this is not an error within the XOAI library - there is a test case for this.

https://github.com/gdcc/xoai/blob/f3310c91334445bd5ac81e265745e80f4c7f7c7b/xoai-data-provider/src/test/java/io/gdcc/xoai/dataprovider/DataProviderTest.java#L58-L64

@cmbz
Copy link

cmbz commented Dec 19, 2023

2023/12/19: Prioritized during meeting on 2023/12/18. Added to Needs Sizing.

@landreev
Copy link
Contributor

Slightly surprised it's still there...
As Oliver is saying above, this is not in the xoai library, so must be something simple in the oai servlet in the Dataverse code base.
Giving it a very generous 10, just in case.

@landreev landreev added the Size: 10 A percentage of a sprint. 7 hours. label Dec 19, 2023
@pdurbin pdurbin self-assigned this Jan 4, 2024
@pdurbin pdurbin removed their assignment Jan 4, 2024
pdurbin added a commit that referenced this issue Jan 8, 2024
dataProvider.handle(params) allows us to return the correct error.
pdurbin added a commit that referenced this issue Jan 16, 2024
@pdurbin pdurbin added this to the 6.2 milestone Jan 17, 2024
@pdurbin
Copy link
Member

pdurbin commented Jan 17, 2024

@claudiodsf fixed in this PR:

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Harvesting Size: 10 A percentage of a sprint. 7 hours. Type: Bug a defect User Role: API User Makes use of APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants