Skip to content

[Bug](url-state-provider): Bug: Incorrect URL Parsing #829

@ArtieReus

Description

@ArtieReus

Description
In the function URLToState, the URL is currently being read using:

window.location.href.match(regex)

With this approach when hash parameters are in the URL causes unexpected behavior and crashes.

Example:

https://dashboard.sap/?org=ccloud&__s=(doop:(f:((id:support~Sgroup,key:check~Isupport~Sgroup,label:support_group,type:check,value:containers)),s:-+,v:-+),greenhouse~Fdashboard:(a:alerts~Fccloud),greenhouse~Forg~Fadmin:(a:%27%27))#/services

Expected Fix
Update URLToState to use:

window.location.search

instead of window.location.href, ensuring only query parameters are read.

Scope of Fix
The fix needs to be applied to version @cloudoperators/juno-url-state-provider-v1@^1.3.2, which is still used by:

  • Greenhouse
  • Doop
  • Supernova
    This version is not the one in main.

Next Steps

  • Rollback main to the version published in @cloudoperators/juno-url-state-provider-v1@^1.3.2
  • Apply the fix described above
  • Add Juno URL State Provider V2 from main to enable a smoother transition of using #router

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions