AdaCore / AdaCore/aws

AWS.Client mangles query parameters.

Open
#382 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
162
Forks
45
PR merge metrics
No merged PRs in 30d

Description

AWS.Client mangles query parameters in some cases by percent-encoding the wrong character.

Here's an example that's easy to reproduce: Apache HTTPD can output file lists on request. A URL like "https://example.net/dir/?C=S;O=D" asks the server to sort the files by size in descending order. AWS.Client.Get sends that URL as "/dir/?C=S;O%3DD". The second equals sign gets encoded to not have any particular meaning. Thus Apache doesn't recognize the parameter "O=D", and sorts in ascending order instead.

A server that generates its own URLs is free to use any syntax it wants in the query part. A client-side library that receives ready-made URLs shall pass them through unmangled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at AWS.Client.Get and the URL query-parameter handling, then reproduce the example URL with ?C=S;O=D. Done means the query is passed through without encoding the second equals sign, so Apache receives and interprets O=D correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.