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

Windows paths not escaped in DevUI #26831

Closed
bwolkerstorfer opened this issue Jul 20, 2022 · 1 comment · Fixed by #26891
Closed

Windows paths not escaped in DevUI #26831

bwolkerstorfer opened this issue Jul 20, 2022 · 1 comment · Fixed by #26891
Labels
area/kotlin env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@bwolkerstorfer
Copy link
Contributor

Describe the bug

On Windows when the DevUI renders the template main.html the path are not properly escaped leading to the page not being able to be used as JavaScript is broken.

The code here takes the paths as is and put them into the HTML, leading to the following error provider:594 Uncaught SyntaxError: Invalid Unicode escape sequence (at provider:594:70).

Expected behavior

The paths should be properly escaped using \\ for path separators on Windows.

Actual behavior

It lead to the JavaScript error:
provider:594 Uncaught SyntaxError: Invalid Unicode escape sequence (at provider:594:70)

How to Reproduce?

Create/move a project into a path where the directory would start with an invalid Unicode character i.e. c:\userproject.

I have created and uploaded a sample project to Github as a sample:
https://github.com/bwolkerstorfer/sample-quarkus-path-issue

Steps:

  1. run the project on Windows using gradle quarkusDev
  2. navigate to i.e. http://localhost:8080/q/dev/io.quarkus.quarkus-oidc/provider
  3. check the JS console

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.10.3.Final

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------ Gradle 7.5 ------------------------------------------------------------ Build time: 2022-07-14 12:48:15 UTC Revision: c7db7b958189ad2b0c1472b6fe663e6d654a5103 Kotlin: 1.6.21 Groovy: 3.0.10 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.3 (Eclipse Adoptium 17.0.3+7) OS: Windows 11 10.0 amd64

Additional information

No response

@bwolkerstorfer bwolkerstorfer added the kind/bug Something isn't working label Jul 20, 2022
@quarkus-bot quarkus-bot bot added area/kotlin env/windows Impacts Windows machines labels Jul 20, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 20, 2022

/cc @evanchooly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kotlin env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant