Checksum: Disallow ADLER32, use Adler32 #3735

This commit is contained in:
Christian Kamm 2015-10-28 09:59:33 +01:00
parent b9fc4c5994
commit 5ea09d2668
2 changed files with 3 additions and 4 deletions

View file

@ -293,14 +293,14 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
/* Check and log the transmission checksum type */
ConfigFile cfg;
const QString checksumType = cfg.transmissionChecksum().toUpper();
const QString checksumType = cfg.transmissionChecksum();
/* if the checksum type is empty, it is not sent. No error */
if( !checksumType.isEmpty() ) {
if( checksumType == checkSumAdlerUpperC ||
if( checksumType == checkSumAdlerC ||
checksumType == checkSumMD5C ||
checksumType == checkSumSHA1C ) {
qDebug() << "Client sends and expects transmission checksum type" << checksumType;
qDebug() << "Client sends transmission checksum type" << checksumType;
} else {
qWarning() << "Unknown transmission checksum type from config" << checksumType;
}

View file

@ -32,7 +32,6 @@ static const char checkSumHeaderC[] = "OC-Checksum";
static const char checkSumMD5C[] = "MD5";
static const char checkSumSHA1C[] = "SHA1";
static const char checkSumAdlerC[] = "Adler32";
static const char checkSumAdlerUpperC[] = "ADLER32";
/**
* @brief Declaration of the other propagation jobs