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

Adding config string with literal plus sign (+) is sanitized as whitespace #2970

Closed
thomasgriffin opened this issue Oct 19, 2017 · 2 comments

Comments

@thomasgriffin
Copy link

Summary

Using the AWS Lambda plugin, one of my AWS key/secret pairs contains a literal plus sign (+) in the string. I couldn't for the life of me figure out why I kept getting key errors until I realized that once the information was saved, the plus sign was removed and replaced with whitespace.

To fix the problem, I had to use %2B in place of the plus sign to get it to save as the literal plus sign. Once I did this, everything worked.

Steps To Reproduce

  1. Configure the AWS Lambda plugin with any API route and pass in a config string that contains a + in it.
  2. After running the RESTful request, notice in the response that the + is stripped out and replaced with whitespace.

Additional Details & Logs

  • Kong version (0.11.0)
  • Operating System: Ubuntu 16.04 (Xenial)
@hishamhm
Copy link
Contributor

hishamhm commented Oct 19, 2017

How did you send the request to the Admin API endpoint?

If you are using curl, for example, when sending any reserved characters in an HTTP request, you need to use --data-urlencode instead of --data to supply your data. This will escape the reserved characters for you.

@p0pr0ck5
Copy link
Contributor

@hishamhm is correct. This is a duplicate of #2651, which in turn was not a bug :) Please use --data-urlencode when defining request body params with + characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants