FTP: fix navigation to ftp://ftp.emea.ibm.com/toibm/tivoli

Recognize a slightly different format of a "Permission denied" error.

BUG=95443
TEST=Navigate to ftp://ftp.emea.ibm.com/toibm/tivoli; no error message should appear.

Review URL: http://codereview.chromium.org/7795024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99788 0039d316-1c4b-4281-b951-d872f2087c98
parent 5e37c45f
......@@ -63,7 +63,7 @@ bool LooksLikePermissionDeniedError(const string16& text) {
if (parts.size() != 3)
return false;
return parts[2] == ASCIIToUTF16("Permission denied");
return parts[2].find(ASCIIToUTF16("Permission denied")) != string16::npos;
}
// Returns the column index of the end of the date listing and detected
......
......@@ -133,6 +133,7 @@ TEST_F(FtpDirectoryListingParserLsTest, Ignored) {
"ftpd: .: Permission denied",
"ftpd-BSD: .: Permission denied",
"ls: .: EDC5111I Permission denied.",
// Tests important for security: verify that after we detect the column
// offset we don't try to access invalid memory on malformed input.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment