vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.78k stars 729 forks source link

view parameter escaping/unescaping issue when using @PushStateNavigation #11057

Open mvysny opened 6 years ago

mvysny commented 6 years ago

Vaadin 8.4.5. Please see the attached application. When I launch it in Intellij Ultimate in Tomcat, it will correctly show that the MyView has been launched with no parameters. Now, please press the "In-app navigation" button. The URL will change to http://localhost:8080/my/foo%3a and the Label will say Parameters: foo%3a. Now, when you press F5 in your browser, for the same URL the Label will say Parameters: foo:.

The behavior is corrected when the @PushStateNavigation is removed from the MyUI class.

mvysny commented 6 years ago

vaadin-app.zip

The example app

mvysny commented 6 years ago

The same bug can be easily reproduced by launching the example app with mvn clean package jetty:run

DALDEI commented 6 years ago

The only workaround that I have found that works perfectly and consistently in all cases I ran into is to encode the entire parameter list ( either 1 or multiple strings ) each being encoded carefully to survive multiple re-encodings and multiple un-encodings by various URL and form encoding algorithms. After a few attempts at being clever I gave up and base-64 encoded the entire thing , but that didn't work because of a few chars in bas64 -- had to modify it to be 'url friendly' -- the "==" padding had to go as well.

I included a start and end token to mark when a string is properly decoded and when to stop :) Ended up with very ugly URL's but oh well.

stale[bot] commented 5 years ago

Hello there!

We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

mlopezFC commented 4 years ago

Still happening in Vaadin 8.10.4

stale[bot] commented 4 years ago

Hello there!

We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

stale[bot] commented 3 years ago

Hello there!

We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!