You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a testcase named #tag. Opening it directs me to /~/<team>/<suite>/<version>/%23tag, which (despite the # being URL-encoded) seems to confuse Touca, and redirect me to the login page (and ultimately, after re-logging in, to the Touca home page).
A similar issue happens with [*example*](https://example.com) (literal testcase name). It results in a "page not found" error in Touca; interestingly, the testcase itself links to a name with https:/ instead of https:// in the URL, which is likely the source of the problem.
Environment
Running Ubuntu 22.04.3 LTS, Touca v2.0.0 via Docker.
Steps To Reproduce
Problem 1:
Create a testcase starting with the # character (e.g. #tag) and submit a test containing it.
Try to open the testcase.
You will be redirected to the login page.
Problem 2:
Create a testcase named [*example*](https://example.com) and submit a test containing it.
Try to open the testcase.
You will get a "page not found" error. Note that the URL is going to end with [*example*](https:/example.com) (note the single slash!); manually attempting to fix it in the address bar will redirect to / (e.g. https://touca.example.com/), resulting in a blank page (not even an error!).
Expected Behavior
Clicking a testcase link should open the testcase as usual, instead of redirecting to the login page or failing to find the testcase.
Additional Context
There appears to be a similar problem with version links, but I don't have an exact reproducible example for them on hand. #xyz is a good guess at something that might fail.
The text was updated successfully, but these errors were encountered:
Thank you so much for reporting this bug, @darkuranium. I just tried both and managed to reproduce the issue(s). I think there are two problems here:
The web app does not properly encode/decode test case names.
The backend does not distinguish between test case name and test case slug (that is used in the URL and as an identifier for the test case).
Until these two issues get resolved (and I guess that it will take a while to fix these), it is safer to assume that testcase names should always be URL-friendly. So, as a workaround, could you try sanitizing the test case names before submitting your data? A basic implementation would be to replace special characters with _ in the test code for example.
Description
I have a testcase named
#tag
. Opening it directs me to/~/<team>/<suite>/<version>/%23tag
, which (despite the#
being URL-encoded) seems to confuse Touca, and redirect me to the login page (and ultimately, after re-logging in, to the Touca home page).A similar issue happens with
[*example*](https://example.com)
(literal testcase name). It results in a "page not found" error in Touca; interestingly, the testcase itself links to a name withhttps:/
instead ofhttps://
in the URL, which is likely the source of the problem.Environment
Running Ubuntu 22.04.3 LTS, Touca v2.0.0 via Docker.
Steps To Reproduce
Problem 1:
#
character (e.g.#tag
) and submit a test containing it.Problem 2:
[*example*](https://example.com)
and submit a test containing it.[*example*](https:/example.com)
(note the single slash!); manually attempting to fix it in the address bar will redirect to/
(e.g.https://touca.example.com/
), resulting in a blank page (not even an error!).Expected Behavior
Clicking a testcase link should open the testcase as usual, instead of redirecting to the login page or failing to find the testcase.
Additional Context
There appears to be a similar problem with version links, but I don't have an exact reproducible example for them on hand.
#xyz
is a good guess at something that might fail.The text was updated successfully, but these errors were encountered: