https://bugs.kde.org/show_bug.cgi?id=480063

Elvis Angelaccio <elvis.angelac...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/pim/
                   |                            |libkgapi/-/commit/b57168b19
                   |                            |e9ea0573a721e30c4abea2d3902
                   |                            |39d2
             Status|ASSIGNED                    |RESOLVED
   Version Fixed In|                            |24.08.2

--- Comment #15 from Elvis Angelaccio <elvis.angelac...@kde.org> ---
Git commit b57168b19e9ea0573a721e30c4abea2d390239d2 by Elvis Angelaccio.
Committed on 26/09/2024 at 20:47.
Pushed by elvisangelaccio into branch 'release/24.08'.

FileFetchJob: fix static initialization order problem

BasicFields/AccessFields/SharingFields are declared as static members,
but in their definitions they require other static members.

This is a classic static initialization order problem. In particular it
may happen that when BasicFields is defined, the
Id/Title/.../Permissions members have _not_ been defined yet: BasicFields
then becomes a QStringList containing 8 empty QStrings.

This is likely what causes bug #480063 where the following broken query
string is sent to google (by a FileFetchJob triggered by kio-gdrive):

   
fields=etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)

This commit fixes the problem by duplicating the string literals in the
definitions of BasicFields/AccessFields/SharingFields.

This commit is only meant for the relase/24.08 branch, so that we don't
need to do breaking changes in the API.

On master we should do the right thing, which is to break the API and
change BasicFields/AccessFields/SharingFields from static class members
to static class methods.
FIXED-IN: 24.08.2

M  +22   -22   src/drive/filefetchjob.cpp

https://invent.kde.org/pim/libkgapi/-/commit/b57168b19e9ea0573a721e30c4abea2d390239d2

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to