Kaydet (Commit) 23826a28 authored tarafından Caolán McNamara's avatar Caolán McNamara

use EDB as well as CVE as encrypted prefixes

Change-Id: I3cb1e4d736ca1627cb0716a9c17ff11b5a837264
üst 2584a460
......@@ -40,8 +40,9 @@ enum filterStatus
};
/*
* NOTE, any files beginning with CVE- will be assumed to be encrypted using
* arcfour with key 0x435645, this is to silence panicky virus/malware-checkers
* NOTE, any files beginning with CVE- or EDB- will be assumed to be encrypted
* using arcfour with key 0x435645, this is to silence panicky
* virus/malware-checkers
*
* e.g. m[de]crypt --bare -a arcfour -o hex -k 435645 -s 3
*/
......
......@@ -87,7 +87,7 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
else
{
rtl::OUString sTmpFile;
bool bCVE = false;
bool bEncrypted = false;
sal_Int32 nLastSlash = sURL.lastIndexOf('/');
......@@ -97,14 +97,19 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
if (sURL.getStr()[nLastSlash+1] == '.')
continue;
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1))
bCVE = true;
if (
(sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1)) ||
(sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("EDB"), nLastSlash+1))
)
{
bEncrypted = true;
}
}
rtl::OString aRes(rtl::OUStringToOString(sURL,
osl_getThreadTextEncoding()));
if (bCVE)
if (bEncrypted)
{
CPPUNIT_ASSERT(osl::FileBase::E_None == osl::FileBase::createTempFile(NULL, NULL, &sTmpFile));
decode(sURL, sTmpFile);
......@@ -118,7 +123,7 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
bool bRes = load(rFilter, sURL, rUserData);
sal_uInt32 nEndTime = osl_getGlobalTimer();
if (bCVE)
if (bEncrypted)
CPPUNIT_ASSERT(osl::FileBase::E_None == osl::File::remove(sTmpFile));
fprintf(stderr, "%s,%" SAL_PRIuUINT32"\n",
......
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