spring-projects / spring-projects/spring-hateoas

Link URLs are incorrectly escaped

Open
#563 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

Since v0.22.0 or 0.23.0 (I can't test 0.22.0), the parameters in a linkTo(methodOn()) are escaped. However, they are not unescaped when a client follows this link, and thus break formerly working code.

I'm not sure if the problem is that the unescaping doesn't happen automatically, or that the escaping is wrong: The character in question is a colon, which may be part of a uri path. Should the unescaping always be done manually? Can we avoid this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with linkTo(methodOn()) using a colon in a URI path parameter on an affected version, then trace how the generated link is escaped and consumed. Done means clients can follow the generated link without manual unescaping, with a regression test covering the colon parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.