Conversation
…request.base_url The issue here is that request.base_url has ASCII-8BIT encoding due to Rack's env having ASCII-8BIT strings and Loofah clears out ASCII-8BIT strings. Instead of trying to change Loofah's or Rack's behavior this commit does the most minimal change by forcing base_url into UTF8 encoding before passing it into the iiif_manifest_presenter. Loofah being applied to all of the manifest's values including id happens in ManifestBuilderService#deep_sanitize that was added as part of 4e5536d.
Test Results 17 files ±0 17 suites ±0 3h 31m 22s ⏱️ + 3m 5s For more details on these failures, see this check. Results for commit 42c0e20. ± Comparison against base commit 105affd. This pull request removes 448 and adds 449 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes #7539
Summary
The issue here is that request.base_url has ASCII-8BIT encoding due to Rack's env having ASCII-8BIT strings and Loofah clears out ASCII-8BIT strings. Instead of trying to change Loofah's or Rack's behavior this commit does the most minimal change by forcing base_url into UTF8 encoding before passing it into the iiif_manifest_presenter. Loofah being applied to all of the manifest's values including id happens in ManifestBuilderService#deep_sanitize that was added as part of 4e5536d.
Guidance for testing, such as acceptance criteria or new user interface behaviors:
@idoridattribute is populated.@samvera/hyrax-code-reviewers