Bug 342694 - No warning about empty metadata
Summary: No warning about empty metadata
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Richardson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 14:39 UTC by Elias Probst
Modified: 2021-09-24 04:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Add some temporary debugging information to kservice (909 bytes, patch)
2015-01-10 14:39 UTC, Elias Probst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2015-01-10 14:39:38 UTC
Created attachment 90323 [details]
Add some temporary debugging information to kservice

It looks like KService doesn't properly validate the metadata in KPluginInfo.
It loads also plugins where the metadata are completely empty.

How to reproduce this/get debugging information:
- install via GHNS a new plasma wallpaper which comes as single picture (without metadata.desktop) or just drop a picture to ~/.local/share/wallpapers
- apply the attached patch to kservice
- restart plasmashell & monitor its output
- open plasmashell's "Desktop Settings" dialog
- hover the previously installed wallpaper

Every time the wallpaper is hovered, the following debug output will be shown by plasmashell:

Constructing a KPluginInfo object from old style JSON. Please use kcoreaddons_desktop_to_json() for "" instead of kservice_desktop_to_json() in your CMake code.
obj: {
                                              "KPlugin": {
                                                  "Authors": {
                                                  },
                                                  "Dependencies": [
                                                  ],
                                                  "Description": "",
                                                  "EnabledByDefault": false,
                                                  "Name": "",
                                                  "ServiceTypes": [
                                                  ]
                                              }
                                          }
plugin: {
                                              "Authors": {
                                              },
                                              "Dependencies": [
                                              ],
                                              "Description": "",
                                              "EnabledByDefault": false,
                                              "Name": "",
                                              "ServiceTypes": [
                                              ]
                                          }

This indicates that at this point, completely empty metadata are loaded which shouldn't pass validation.
Comment 1 Elias Probst 2015-01-17 00:36:19 UTC
Is https://git.reviewboard.kde.org/r/121737/ supposed to fix this? It looks related to me, but I miss the knowledge to actually tell…
Comment 2 David Faure 2015-01-22 08:18:52 UTC
Metadata isn't mandatory. It's just a way to get more info about plugins.

I don't understand what the bug would be, then?
That fromCompatibilityJson is being called at all?
Comment 3 Ahmad Samir 2021-08-25 21:57:14 UTC
Is this issue still valid?
Comment 4 Bug Janitor Service 2021-09-09 04:36:03 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2021-09-24 04:35:38 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!