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

contentRoute.AbsolutePath not being correctly unescaped #16745

Open
ava3a13 opened this issue Jul 4, 2024 · 5 comments · May be fixed by #17266
Open

contentRoute.AbsolutePath not being correctly unescaped #16745

ava3a13 opened this issue Jul 4, 2024 · 5 comments · May be fixed by #17266
Assignees
Labels
area/backend community/up-for-grabs state/needs-reproduction Check if this can be reproduced in the latest released version type/bug

Comments

@ava3a13
Copy link

ava3a13 commented Jul 4, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

12.3.3

Bug summary

internal abstract class RoutingServiceBase {
    protected static string GetContentRoute(DomainAndUri domainAndUri, Uri contentRoute)
}

GetContentRoute accesses PathRelativeToDomain with the contentRoute.AbsolutePath.
Issue arrises for languages like Georgian, which by its definition are always encoded, and accessing variable is passed in its encoded form.
I have a website that utilizes both paths for both languages ('ka' and 'en-US'), upon retrieving content first time the issue arises in the case whenever user tries to access content with /en/ prefix and Georgian suffix - and the Accept-Language header is present ("ka" in my case)
Only solution was to use Uri.UnescapeDataString(contentRoute.AbsolutePath) but as it is an internal class, I had to move my source alongside core.

Specifics

No response

Steps to reproduce

Create general list of items: e.g. News
Create a news item - One with any English name and another in Georgian - "გამარჯობა უმბრაკო"
Encode Georgian path and retrieve item with - /umbraco/delivery/api/v1/content/item/en/news/%E1%83%92%E1%83%90%E1%83%9B%E1%83%90%E1%83%A0%E1%83%AF%E1%83%9D%E1%83%91%E1%83%90%20%E1%83%A3%E1%83%9B%E1%83%91%E1%83%A0%E1%83%90%E1%83%99%E1%83%9D/

You will see the result as below:
image

Expected result / actual result

The news item should be retrieved accordingly

Copy link

github-actions bot commented Jul 4, 2024

Hi there @ava3a13!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@iOvergaard
Copy link
Contributor

Thanks for reporting this. I suspect this is still a problem in newer versions of Umbraco. We'd like some help getting it fixed!

@iOvergaard iOvergaard added community/up-for-grabs state/needs-reproduction Check if this can be reproduced in the latest released version area/backend labels Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

Hi @ava3a13,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)

@ava3a13
Copy link
Author

ava3a13 commented Oct 3, 2024

@iOvergaard I can get it fixed

@iOvergaard
Copy link
Contributor

Please go ahead, @ava3a13. I have assigned you 👍

@ava3a13 ava3a13 linked a pull request Oct 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend community/up-for-grabs state/needs-reproduction Check if this can be reproduced in the latest released version type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants