https://bugs.kde.org/show_bug.cgi?id=412944
Bug ID: 412944 Summary: Wrong Piwigo version parsing (2.10.x < 2.4) Product: digikam Version: unspecified Platform: Other OS: All Status: REPORTED Severity: normal Priority: NOR Component: Plugin-WebService-Piwigo Assignee: digikam-bugs-n...@kde.org Reporter: er...@erack.de CC: frederic.coiff...@free.fr Target Milestone: --- With a recent Piwigo version 2.10.0 or 2.10.1 the plugin refuses to work, saying "Failed to login into remote piwigo. Upload to Piwigo version < 2.4 is no longer supported." The cause is in ./core/dplugins/generic/webservices/piwigo/piwigotalker.cpp line 487 in PiwigoTalker::parseResponseGetVersion() where the regex QRegExp verrx(QLatin1String(".?(\\d)\\.(\\d).*")); extracts only two digits (here '2' and '1' of "2.10.1") that then later in line 509 are calculated as d->version = qsl[1].toInt() * 10 + qsl[2].toInt(); resulting in 20+1 thus the value 21 which is less than 24. A correct attempt would be to allow at least 2 (better more) digits for each major.minor, hence QRegExp verrx(QLatin1String(".?(\\d+)\\.(\\d+).*")); and for example d->version = qsl[1].toInt() * 1000 + qsl[2].toInt(); that would work with up to 3 digits per minor. The error occurred also in digikam 5.9.0 Piwigo export kipi plugin. -- You are receiving this mail because: You are watching all bug changes.