analytics icon indicating copy to clipboard operation
analytics copied to clipboard

issue in dataload: URL parsing replace &

Open GH2204 opened this issue 3 years ago • 8 comments

Hi folks,

I want to create a selfrising dataset with prices of fuels with auto-dataload. In the URL for the JSON data, there are two html-parameters, concatenated with an interampersand "&". After I have saved the input, the interampersand "&" is changed to "&" and the URL doesn't work. The test run ends with an error. Found this:

  • https://stackoverflow.com/questions/3541711/url-encode-sees-ampersand-as-amp-html-entity
  • https://stackoverflow.com/questions/9084237/what-is-amp-used-for
  • https://stackoverflow.com/questions/16622504/escaping-ampersand-in-url

I'm using this URL: https://creativecommons.tankerkoenig.de/json/prices.php?ids=[ID_OF_FUELSTATION]&apikey=[MY_KEY] After saving input-set URL is: https://creativecommons.tankerkoenig.de/json/prices.php?ids=[ID_OF_FUELSTATION]&apikey=[MY_KEY] After saving twice URL is: https://creativecommons.tankerkoenig.de/json/prices.php?ids=[ID_OF_FUELSTATION]&apikey=[MY_KEY] ... or is there a mistake in my way of proceeding?

GH2204 avatar May 04 '22 14:05 GH2204

Hello, thank you. this seems to be the result of an XSS-Protection fix. I will have a look. this does not make sense. you are correct

Rello avatar May 19 '22 08:05 Rello

4.3.0 released

Rello avatar Jun 13 '22 19:06 Rello

Looks to me like this is still broken. With a URL like https://hostname.tld/data?foo=bar&baz=qwe and running occ analytics:load 1 i will get > GET /data?foo=bar&baz=qwe HTTP/1.1 in the output and an error response from the server.

paspil avatar Oct 06 '22 09:10 paspil

Hi, this should be fixed. can you please try to execute the dataload in the browser with the simulation flag?

then in the console of this request, you will see the url used Bildschirmfoto 2022-10-06 um 15 55 58

Rello avatar Oct 06 '22 13:10 Rello

oh wait. i found the issue. a fix was not committed. I will push a bug fix release the next days. this will then be included

Rello avatar Oct 06 '22 14:10 Rello

It works now. Thank you very much!

paspil avatar Oct 06 '22 20:10 paspil

did you commit the patch locally???

Rello avatar Oct 07 '22 07:10 Rello

did you commit the patch locally???

Yes, for testing.

paspil avatar Oct 14 '22 06:10 paspil