mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-06 21:50:39 +08:00
fix(Command): filter "`" for comamnd (shell inject)
This commit is contained in:
@@ -42,8 +42,8 @@ class Command
|
||||
// return '"' . $argument . '"';
|
||||
|
||||
$pattern = [
|
||||
'/(^|[^\\\\])((\\\\\\\\)*[\s\'\"\$\|])/',
|
||||
'/(^|[^\\\\])((\\\\\\\\)*\\\\([^\s\'\"\|\$\\\\]|$))/'
|
||||
'/(^|[^\\\\])((\\\\\\\\)*[\s\`\'\"\$\|])/',
|
||||
'/(^|[^\\\\])((\\\\\\\\)*\\\\([^\s\`\'\"\|\$\\\\]|$))/'
|
||||
];
|
||||
$replacement = [
|
||||
'$1\\\\$2',
|
||||
|
||||
Reference in New Issue
Block a user