Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
escape dots in the regex patterns
  • Loading branch information
mcdruid committed Nov 26, 2024
commit a4cb3930f6d604f52e43d1f4bc0ce7b4c25e5cb5
2 changes: 1 addition & 1 deletion gadgetchains/Magento2/FI/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function process_parameters(array $parameters)
$parameters = parent::process_parameters($parameters);
// Remove the .php suffix if it has been specified, as it will be added
// by the application.
$parameters['remote_path'] = preg_replace('#.php$#i', '', $parameters['remote_path']);
$parameters['remote_path'] = preg_replace('#\.php$#i', '', $parameters['remote_path']);
$parameters['remote_path'] = '/../../../pub/' . ltrim($parameters['remote_path'], '/');
return $parameters;
}
Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Magento2/FI/2/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function process_parameters(array $parameters)
$parameters = parent::process_parameters($parameters);
// Remove the prefix and suffix if they have been specified, as they
// will be added by the application.
$parameters['remote_path'] = preg_replace('#(rsl::|.php$)#i', '', $parameters['remote_path']);
$parameters['remote_path'] = preg_replace('#(rsl::|\.php$)#i', '', $parameters['remote_path']);
return $parameters;
}

Expand Down