Summary: | Wrong Piwigo version parsing (2.10.x < 2.4) [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Eike Rathke <erack> |
Component: | Plugin-WebService-Piwigo | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, frederic.coiffier, mathieu |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | All | ||
Latest Commit: | https://invent.kde.org/kde/digikam/commit/b08f3555d511a5a8117566dbe9d655af0019ae2c | Version Fixed In: | 6.4.0 |
Sentry Crash Report: |
Description
Eike Rathke
2019-10-14 17:38:53 UTC
Git commit 402a88c480daf819275470518e1a26c22c9efcd4 by Gilles Caulier. Committed on 14/10/2019 at 17:55. Pushed by cgilles into branch 'master'. fix wrong piwigo version parsed by talker FIXED-IN: 6.4.0 M +1 -1 core/dplugins/generic/webservices/piwigo/piwigotalker.cpp https://invent.kde.org/kde/digikam/commit/402a88c480daf819275470518e1a26c22c9efcd4 Thanks for the fast fix! While that likely will work, d->version will not match the proper version though, as it will be calculated as 20+10=30 (which is >24 so that part should be ok), mimicking a 3.0. Just mentioning in case d->version is used for other purposes as well, I didn't check; or in future needs to compare against a future version where "3.0" 30 would be less than "2.15" 35 ... Thank you Gilles, I agree that a change like below could be better (up to 2.100.0 ;-) : diff --git a/core/dplugins/generic/webservices/piwigo/piwigotalker.cpp b/core/dplugins/generic/webservices/piwigo/piwigotalker.cpp index 8b75674ddd..eeb915bac0 100644 --- a/core/dplugins/generic/webservices/piwigo/piwigotalker.cpp +++ b/core/dplugins/generic/webservices/piwigo/piwigotalker.cpp @@ -506,7 +506,7 @@ void PiwigoTalker::parseResponseGetVersion(const QByteArray& data) if (verrx.exactMatch(v)) { QStringList qsl = verrx.capturedTexts(); - d->version = qsl[1].toInt() * 10 + qsl[2].toInt(); + d->version = qsl[1].toInt() * 100 + qsl[2].toInt(); qCDebug(DIGIKAM_WEBSERVICES_LOG) << "Version: " << d->version; break; } diff --git a/core/dplugins/generic/webservices/piwigo/piwigotalker.h b/core/dplugins/generic/webservices/piwigo/piwigotalker.h index 739cf2096e..14e751a920 100644 --- a/core/dplugins/generic/webservices/piwigo/piwigotalker.h +++ b/core/dplugins/generic/webservices/piwigo/piwigotalker.h @@ -73,7 +73,7 @@ public: enum { CHUNK_MAX_SIZE = 512*1024, - PIWIGO_VER_2_4 = 24 + PIWIGO_VER_2_4 = 204 }; public: Hi Frédéric, Whole digiKam source code is now migrated to gitlab, and normally your account as developer must be created. You can commit your fix in the the plugin directly. If your account is not present, we will ask to KDE core team to recreate the account. Best Gilles Caulier Git commit b08f3555d511a5a8117566dbe9d655af0019ae2c by Gilles Caulier. Committed on 18/10/2019 at 14:37. Pushed by cgilles into branch 'master'. apply patch from Frederic Coiffier about Piwigo version check in digiKam plugin M +1 -1 core/dplugins/generic/webservices/piwigo/piwigoplugin.cpp M +2 -2 core/dplugins/generic/webservices/piwigo/piwigotalker.cpp M +2 -2 core/dplugins/generic/webservices/piwigo/piwigotalker.h https://invent.kde.org/kde/digikam/commit/b08f3555d511a5a8117566dbe9d655af0019ae2c Ah nice, that looks promising :-) Could both commits be backported to 5.9.0 kipi plugins so that Debian buster and derivates would benefit, and maybe 6.1.0 for Fedora F29 and 6.2.0/6.3.0 for others? Thanks. Eike (In reply to Eike Rathke from comment #6) > Could both commits be backported to 5.9.0 kipi plugins so that Debian buster +1! |