errbot icon indicating copy to clipboard operation
errbot copied to clipboard

errbot, or Slack, is URI encoding special characters like "greater than"

Open lingfish opened this issue 6 years ago • 1 comments

In order to let us help you better, please fill out the following fields as best you can:

I am...

  • [x] Reporting a bug
  • [ ] Suggesting a new feature
  • [ ] Requesting help with running my bot
  • [ ] Requesting help writing plugins
  • [ ] Here about something else

I am running...

  • Errbot version: 5.2.0
  • OS version: Debian Stretch
  • Python version: 3.6.4
  • Using a virtual environment: yes

Issue description

When using the configuration system, it seems that data being stored is being URI encoded by either the bot, or Slack (eg "greater than" > is being stored as ">".

Steps to reproduce

Setup a basic config dict, and then attempt to store the string "123>456".

When querying that back, it appears to be right in the Slack client, but when I use that field for say, a password, and send that to an external API, it sends > instead.

You can see this with a quick self.log call within plugin code.

lingfish avatar Aug 12 '18 23:08 lingfish

I just found #964 which seems to be related.

I think the only way around this until devs have a better idea, is for the user to have to supply (for example) a base64 encoded string, and unwrap it in the plugin.

As I think of that suggestion a little more, even the trailing equals may still get mangled :(

lingfish avatar Aug 13 '18 03:08 lingfish