Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commitfbf9c7e
committed
Fix command injection
Add `--` in some commands that receive user inputand if interpreted as options could lead to remotecode execution (RCE).There may be more commands that could benefit from `--`so the input is never interpreted as an option,but most of those aren't dangerous.Fixed commands:- push- pull- fetch- clone/clone_from and friends- archive (not sure if this one can be exploited, but it doesn't hurt adding `--` :))For anyone using GitPython and exposing any of the GitPython methods to users,make sure to always validate the input (like if starts with `--`).And for anyone allowing users to pass arbitrary options, be awarethat some options may lead fo RCE, like `--exc`, `--upload-pack`,`--receive-pack`, `--config` (#1516).Ref#15171 parent17ff263 commitfbf9c7e
2 files changed
+5
-3
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
964 | 964 |
| |
965 | 965 |
| |
966 | 966 |
| |
967 |
| - | |
| 967 | + | |
968 | 968 |
| |
969 | 969 |
| |
970 | 970 |
| |
| |||
991 | 991 |
| |
992 | 992 |
| |
993 | 993 |
| |
994 |
| - | |
| 994 | + | |
995 | 995 |
| |
996 | 996 |
| |
997 | 997 |
| |
| |||
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 | 1036 |
| |
| 1037 | + | |
1037 | 1038 |
| |
1038 | 1039 |
| |
1039 | 1040 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1169 | 1169 |
| |
1170 | 1170 |
| |
1171 | 1171 |
| |
| 1172 | + | |
1172 | 1173 |
| |
1173 | 1174 |
| |
1174 | 1175 |
| |
| |||
1305 | 1306 |
| |
1306 | 1307 |
| |
1307 | 1308 |
| |
1308 |
| - | |
| 1309 | + | |
1309 | 1310 |
| |
1310 | 1311 |
| |
1311 | 1312 |
| |
|
0 commit comments
Comments
(0)