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 #1225

Conversation

bruno-atmire
Copy link
Contributor

References

Description

Encode each segment that comes from the function's inputs separately with encodeURIComponent, instead of once at the end with encodeURI.

Instructions for Reviewers

See #1224 for steps on how to test.

List of changes in this PR:

  • do proper uri encoding in requestService.uriEncodeBody
  • add unit test

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@benbosman benbosman added the 1 APPROVAL pull request only requires a single approval to merge label Jun 10, 2021
@benbosman benbosman added this to the 7.0 milestone Jun 10, 2021
@tdonohue
Copy link
Member

@bruno-atmire : If you could rebase this on the latest main, the CI/build process has just been fixed. Once you pull in the fix, your tests should hopefully succeed.

@tdonohue tdonohue self-requested a review June 17, 2021 14:46
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks correct and the reasoning makes sense & tests prove this is working as expected. The old code is obviously incorrect. Thanks @bruno-atmire !

@tdonohue tdonohue merged commit e546a4f into DSpace:main Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow rejection reasons are not properly encoded
3 participants