-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
%!(MISSING) with include-command-output-in-response (RAW output) #313
Comments
The fmt.Sprintf("%s", untrusted) instead of: fmt.Sprintf(untrusted) |
Hi, I'm aware it's an issue with This is just plain bash echo. |
Thanks for the report and the clarification. The problems are in these lines with |
Good catch! |
Looks like replacing those calls with |
Yep, and anywhere else where the formatting hasn't been used. |
Will try to submit a PR later today. |
OK, after having some issues running the code, which was caused by VS Code refactoring my imports based on my Windows Go installation (and I was running webhook in a Linux VM) and getting lots of errors I was able to successfully fix this issue.
I've looked into adding a test to PS: to make testing forks easier, wouldn't it be better to change the import of |
Is there anything else you'd like me have to do on this issue or should I submit the PR? |
@Htbaa, see this section of the Hugo contributing guide for a quick walk-thru on using git branches and remotes for Go development. That will work around the import path issue. |
@moorereason thanks, will look into that. I'll submit the PR as well. If I figure out how to do it :-S. |
I had the idea of using webhook in front of a CLI tool I wrote (also in Golang). My tool can output in plain text, XML and JSON. So instead of adding a server to my tool I thought using webhook would be a neat way of exposing a set of its commands to a HTTP API.
If a command outputs a
%
character the output a HTTP client gets differs from the output that's logged when you run webhook with-verbose
.Tested with webhook version 2.6.9.
hooks.json
The output of
webhook -hooks hooks.json -verbose
:And the result of a HTTP client:
I would expect the result of the HTTP client be the same as what's being logged, namely
%
.The text was updated successfully, but these errors were encountered: