2013-10-10 Ramon Novoa <rnovoa@artica.es>

* src/expand_command.cc: Improved injection detection. Thanks to
	  Robert van Hamburg (xistence) for finding the vulnerability.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8884 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2013-10-10 10:30:10 +00:00
parent 0f3cb2d397
commit 606c8952b1
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2013-10-10 Ramon Novoa <rnovoa@artica.es>
* src/expand_command.cc: Improved injection detection. Thanks to
Robert van Hamburg (xistence) for finding the vulnerability.
2013-10-10 Ramon Novoa <rnovoa@artica.es>
* src/expand_command.cc,

View File

@ -25,8 +25,10 @@ using namespace std;
string safe_param (string param)
{
// Remove leading backticks
while (!param.empty() && param.at(0) == '`') {
// Remove leading backticks and blanks
while (!param.empty() && (param.at(0) == '`' ||
param.at(0) == '\t'||
param.at(0) == ' ')) {
param.erase(0);
}