summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnar Thomsen <rthomsen6@gmail.com>2016-11-13 18:29:53 (GMT)
committerRagnar Thomsen <rthomsen6@gmail.com>2016-11-13 18:29:53 (GMT)
commitdfeb049e9251ccb4babbe0e91dff7cac95dccf81 (patch)
treed17254d9893758c1c7e21dcfedc26e6c8f743cc3
parent61d9f87227711c9b9a7d0180479f94447c6039f7 (diff)
clizip: Detect correct encryption method for AES-encrypted zips
Compression method is always set to 099 for AES-encrypted zip archives (WinZip style). Clizip outputs this as u099. Hence we should emit encryptionMethodFound when finding this compression method. In this case we set the compression method to unknown. Differential Revision: D3351
-rw-r--r--plugins/clizipplugin/cliplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/clizipplugin/cliplugin.cpp b/plugins/clizipplugin/cliplugin.cpp
index a61cdaf..33ba408 100644
--- a/plugins/clizipplugin/cliplugin.cpp
+++ b/plugins/clizipplugin/cliplugin.cpp
@@ -26,6 +26,7 @@
#include "kerfuffle/cliinterface.h"
#include "kerfuffle/kerfuffle_export.h"
+#include <KLocalizedString>
#include <KPluginFactory>
#include <QDateTime>
@@ -292,6 +293,9 @@ QString CliPlugin::convertCompressionMethod(const QString &method)
return QStringLiteral("Deflate");
} else if (method == QLatin1String("bzp2")) {
return QStringLiteral("BZip2");
+ } else if (method == QLatin1String("u099")) {
+ emit encryptionMethodFound(QStringLiteral("AES"));
+ return i18nc("referred to compression method", "unknown");
}
return method;
}