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

Escaped '&' in ?url= parameter is no longer passed through to rrd request #5497

Closed
jleibs opened this issue Mar 13, 2024 · 3 comments
Closed
Labels
egui Requires egui/eframe work 🦟 regression A thing that used to work in an earlier release user-request This is a pressing issue for one of our users 🕸️ web regarding running the viewer in a browser

Comments

@jleibs
Copy link
Member

jleibs commented Mar 13, 2024

This appears to be a regression as of 0.12.

In order to deal with things likes access tokens it can be helpful to pass through additional url-parameters as part of the rrd uri.

Consider an rrd that needs to be access as: data.rrd?param1=foo&param2=bar, escaped as data.rrd%3Fparam1%3Dfoo%26param2%3Dbar.

When including these parameters at the end of the url string:

In 0.11, this worked correctly:
https://app.rerun.io/version/0.11.0/?url=https://demo.rerun.io/version/0.11.0/examples/dna/data.rrd%3Fparam1%3Dfoo%26param2%3Dbar

As evidenced in the developer tools:
image

However, as of 0.12.0:
https://app.rerun.io/version/0.12.0/?url=https://app.rerun.io/version/0.12.0/examples/dna.rrd%3Fparam1%3Dfoo%26param2%3Dbar

The first parameter is passed through, but not the second:
image

@jleibs jleibs added 🕸️ web regarding running the viewer in a browser 🦟 regression A thing that used to work in an earlier release user-request This is a pressing issue for one of our users labels Mar 13, 2024
@jprochazk
Copy link
Member

This seems to be a bug in egui. The query param parsing done is not percent-decoding things in the right order, it seems: https://github.com/emilk/egui/blob/47fbce665ab64bd2595e960f674427d94b28ec94/crates/eframe/src/web/backend.rs#L123

The entire url is percent-decoded at once which means any extra & characters get interpreted as part of the query map. Instead it should first split by &, then by = and percent-decode each key and value separately.

There's a related issue here which is that any embedded Rerun viewer will assume the url parameter is a URL to an RRD file it should load, which is not always true. We should remove usage of query_map and instead explicitly pass in the URL into WebHandle::start.

@emilk emilk added the egui Requires egui/eframe work label Mar 14, 2024
@emilk
Copy link
Member

emilk commented Mar 14, 2024

Fixed in eframe:

just needs an update

@emilk emilk closed this as completed Mar 18, 2024
@jprochazk
Copy link
Member

jprochazk commented Mar 18, 2024

Opened an issue for the 2nd part here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui Requires egui/eframe work 🦟 regression A thing that used to work in an earlier release user-request This is a pressing issue for one of our users 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

No branches or pull requests

3 participants