Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

remindbot does not scape quotes #213

Open
davidnortes opened this issue Apr 13, 2022 · 0 comments
Open

remindbot does not scape quotes #213

davidnortes opened this issue Apr 13, 2022 · 0 comments

Comments

@davidnortes
Copy link

Summary

Remindbot removes all quotes regardless whether they are escaped or not

Steps to reproduce

Steps to reproduce the behavior:

  1. Create the following reminder (no escaped quotes) /remind me "sudo su -c "R -e \"update.packages(ask = FALSE)\"" " in 1 minute
  2. Create the following reminder (escaped quotes) /remind me "sudo su -c \"R -e \\"update.packages(ask = FALSE)\\"\" " in 1 minute
  3. Create the following reminder (escaped quotes) /remind me "sudo su -c \\\"R -e \\\\"update.packages(ask = FALSE)\\\\"\\\" " in 1 minute
  4. open up the interactive dialog to schedule a reminder by tipping /remind
  5. In message type sudo su -c "R -e \"update.packages(ask = FALSE)\""
  6. In target type me, then time = 10 minutes

Expected behavior

A reminder message is sent reminding user to execute the following command sudo su -c "R -e \"update.packages(ask = FALSE)\""

Observed behavior (that appears unintentional)

A reminder message is sent reminding user to execute the following commands, depending on the reminder set

  1. Case of no escaped quotes → sudo su -c R -e \update.packages(ask = FALSE)\
  2. First case of escaped quotes → sudo su -c \R -e \\update.packages(ask = FALSE)\\
  3. Second case of escaped quotes → sudo su -c \\R -e \\\update.packages(ask = FALSE)\\\\

However, when using the interactive dialog, everything works as expected:

image

Server configuration

Operating system: Alpine 3.10

Mattermost version: 5.31.0

Remind version: 0.4.5

Question

Am I missing something when escaping my quotes?

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

No branches or pull requests

1 participant