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

XIVY-15609 Improve path encoding for signing request #34

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

alexsuter
Copy link
Member

@alexsuter alexsuter commented Dec 6, 2024

Using UrlEncoder which is not especially designed for this.
It's hard to find out, how the calling end url is, because
this relies on the underlying technology jersey -> connectory
-> apache http connector. Tried a lot of stuff and this implementation
was the best. It specially handles the characters which are also
specially handled in UrlEncoder.

The main problem is that we should not allow to create such documents.
We should difference between a display name and a technical file name.

@weissreto I'm not happy with the solution, but invested already multiple hours. This solution is at least working for a lot of special characters.

Copy link

github-actions bot commented Dec 6, 2024

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 51c867c. ± Comparison against base commit b86884e.

♻️ This comment has been updated with latest results.

Using UrlEncoder which is not especially designed for this.
It's hard to find out, how the calling end url is, because
this relies on the underlying technology jersey -> connectory
-> apache http connector. Tried a lot of stuff and this implementation
was the best. It specially handles the characters which are also
specially handled in UrlEncoder.

The main problem is that we should not allow to create such documents.
We should difference between a display name and a technical file name.
@alexsuter alexsuter requested a review from weissreto December 6, 2024 13:25
@alexsuter alexsuter merged commit 0a48fde into master Dec 6, 2024
5 checks passed
@alexsuter alexsuter deleted the fix-path-enconding branch December 6, 2024 13:26
Copy link
Member

@weissreto weissreto left a comment

Choose a reason for hiding this comment

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

I don't understand why this is necessary. What was wrong with new URI(...).toASCIIString()?

@alexsuter
Copy link
Member Author

I don't understand why this is necessary. What was wrong with new URI(...).toASCIIString()?

It does not escape whitespaces and other chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants