Skip to content

Commit

Permalink
Update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
porrige51122 committed May 16, 2022
1 parent af08063 commit 9a6cef4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ steps:
To prevent parameter injection, all inputs have been sanitized to the regex:
```
[^a-zA-Z0-9_!@#%*-]
[^a-zA-Z0-9_!@#:%*${}\/\\-]
# All letters a-z, A-z. All numbers 0-9. _ and - characters.
```
This prevents Special Characters:
Expand All @@ -76,7 +76,6 @@ Newline (0x0a or \n)
|
||
command `
$(command )
```

This protection includes passwords, therefore if errors occur, please make sure your password is within this regex.
Expand Down
2 changes: 1 addition & 1 deletion kla.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def execute_command(cmd):
def build_kla_parameters():
print("Building parameters...")
cmd_parameters = ""
filter = "[^a-zA-Z0-9_!@#:%*-]"
filter = "[^a-zA-Z0-9_!@#:%*${}\/\\-]"
for param in INPUT_PARAMS:
try:
env = re.sub(filter, "", os.environ[f"INPUT_{param[0]}"])
Expand Down

0 comments on commit 9a6cef4

Please sign in to comment.