question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate querystring pairs

See original GitHub issue

Repro steps.

  • Deploy a node-based app to App Services
  • Enable web server logging
  • Hit a page that contains a querystring variable, such as http://mysite/?foo=bar
  • Check the web server logs and notice that the entry for the hit contains duplicated querystring values, eg [date] [servername] GET / foo=bar&foo=bar&X-ARR-LOG-ID=[guid]

Project structures.

I have duplicated this in two different node apps. One app uses a custom iisnode.yml and web.config but they are not too far off from the defaults. The other app does not use a custom iisnode.yml or web.config but instead has them generated by the kudu deployment command. The first app uses node 7.7.4 and the second uses 8.0.0.

I believe the URL logged in the web server logs comes straight from IIS and is not affected at all by the node app itself. Therefore I think the issue is either in the IIS configuration further up the chain or some other process that I’m unaware of.

Mention any other details that might be useful.

I also happen to have a .NET application deployed to App Services as well that does not exhibit the issue.

I discovered this because of an issue with the querystring being too long and hitting requestFiltering limits. Despite the original querystring being under the limit, the duplicated value put it over and triggered IIS filtering those requests into 404.15.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
davidebbocommented, Jun 7, 2018

Changing it to PATH_INFO. Based on some more testing, it doesn’t seem to break anything. Though it still comes with a risk since it’s been like that for years. We’ll see.

1reaction
davidebbocommented, Jun 13, 2018

Note that this change is now fully deployed. Please verify that it all works with no workarounds now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authoritative position of duplicate HTTP GET query keys
I am having trouble on finding authoritative information about the behavior with HTTP GET query string duplicate fields, like
Read more >
Query string contains repetitive parameters
Query string contains repetitive parameters. This means that the URL in question contains a query string with the same parameter more than once....
Read more >
Duplicate key value pair querystring
I am using url re-write in my asp.net application web.config file.But when i submit a form the query string value has to be...
Read more >
Duplicate query strings such as array parameters are ...
I'm trying to add a URL to a link field with a query string of page?content_type=foo&content_type=bar but when the link renders I just...
Read more >
How to skip duplicate key in query string · Issue #293
How can I skip a key that has already been parsed/added? Is there an option I can add to queryString.parse(location.search) to ignore duplicates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found