-
Bug
-
Resolution: Duplicate
-
Normal
-
None
-
6.14.0
Description of problem:
Today we call `curl -sS … | bash`, which means that if curl for some reason fails, bash is still executed.
This especially means that if curl fetches an error page, the error page is executed:
bash: line 1: html: No such file or directory
bash: line 2: head: No such file or directory
bash: line 3: !--: No such file or directory
bash: line 4: !--: No such file or directory
bash: line 5: meta: No such file or directory
bash: line 6: title: No such file or directory
bash: line 7: style: No such file or directory
bash: line 8: BODY: command not found
bash: line 9: font-family: command not found
bash: line 9: $'\r': command not found
bash: line 10: font-size: command not found
...
bash: line 71: tr: No such file or directory
bash: line 72: syntax error near unexpected token `<'
'ash: line 72: ` <td><blockquote>
If we call curl with -sSf, it will not output the error page and will not try to execute possibly bad code on the user system.
Version-Release number of selected component (if applicable):
all of them
How reproducible:
100%
Steps to Reproduce:
1. make the registration template endpoint return an error
2. call curl | bash
Actual results:
see above
Expected results:
errored out, no bad commands executed
Additional info:
- is related to
-
SAT-34055 Registering host with invalid hostgroup doesn't fail
-
- Closed
-