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

Workflow rejection reasons are not properly encoded #1224

Closed
bruno-atmire opened this issue Jun 9, 2021 · 2 comments · Fixed by #1225
Closed

Workflow rejection reasons are not properly encoded #1224

bruno-atmire opened this issue Jun 9, 2021 · 2 comments · Fixed by #1225
Assignees
Labels
bug component: workflow Difficulty: Medium Estimated at between 8 and 16 hours e/1 Estimate in hours
Milestone

Comments

@bruno-atmire
Copy link
Contributor

Describe the bug
When an item is rejected in the workflow, the user has the option to provide a rejection "reason". That "reason" is not properly encoded when it is sent to the backend. In particular, the ampersand character causes the remainder of the message to be "ignored".
I was able to reproduce the bug on https://demo7.dspace.org/. The bug is located here.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a collection and assign yourself to the reviewers group (default DSpace workflow)
  2. Add a new item to that collection
  3. Reject the item and add special characters to the reason, e.g. &, @...
  4. Submit the reason
  5. Observe that the body of the POST request contains the specified reason, up until the first ampersand. Also observe that additional properties are sent that should not be present.
  6. Submit the item again and this time accept it
  7. Observe that in dc.description.provenance, the "rejection reason" is incomplete.

Expected behavior
The rejection reason should be encoded properly, such that it cannot be interpreted as a form parameter. Then the POST request will contain the complete message, and so will the provenance value. No changes are needed to the backend.

@bruno-atmire bruno-atmire added bug needs triage New issue needs triage and/or scheduling labels Jun 9, 2021
@benbosman
Copy link
Member

@tdonohue this should be doable with 1 hour of work

@tdonohue
Copy link
Member

tdonohue commented Jun 9, 2021

Thanks @benbosman and @bruno-atmire for getting this added. I'll pull this into the 7.0 board with medium priority and assign to your team. That said, please do feel free to work on this once high priority tickets are all completed/in progress, as it seems like something that'd be good to fix in 7.0

@tdonohue tdonohue added component: workflow Difficulty: Medium Estimated at between 8 and 16 hours e/1 Estimate in hours and removed needs triage New issue needs triage and/or scheduling labels Jun 9, 2021
@tdonohue tdonohue assigned benbosman and unassigned tdonohue Jun 9, 2021
@tdonohue tdonohue added this to the 7.0 milestone Jun 9, 2021
4science-it pushed a commit to 4Science/dspace-angular that referenced this issue Jan 16, 2024
[DSC-1383] Fix metrics layout and responsivity

Approved-by: Andrea Barbasso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: workflow Difficulty: Medium Estimated at between 8 and 16 hours e/1 Estimate in hours
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants