After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702741 - 7.3.122.8: Rygel must check supplied createClass
7.3.122.8: Rygel must check supplied createClass
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: librygel-server
git master
Other Linux
: Normal normal
: ---
Assigned To: rygel-maint
rygel-maint
ivi
Depends on:
Blocks:
 
 
Reported: 2013-06-20 12:37 UTC by Jens Georg
Modified: 2013-08-01 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Validate createClass value (1.85 KB, patch)
2013-07-25 21:34 UTC, Parthiban Balasubramanian
needs-work Details | Review
Validate createClass value updated as per review (1.88 KB, patch)
2013-07-29 15:51 UTC, Parthiban Balasubramanian
committed Details | Review

Description Jens Georg 2013-06-20 12:37:41 UTC
When a client tries to create a container, it can also supply a createClass. Rygel needs to check whether the supplied class is actually supported and report 712 if it doesn't.
Comment 1 Parthiban Balasubramanian 2013-07-25 21:34:27 UTC
Patch attached fixes the validation of createClass value
Comment 2 Parthiban Balasubramanian 2013-07-25 21:34:47 UTC
Created attachment 250146 [details] [review]
Validate createClass value
Comment 3 Jens Georg 2013-07-26 16:20:49 UTC
Review of attachment 250146 [details] [review]:

Thanks, couple of things:
 - The indenting is completely weird
 - The error message should be marked translatable using _(). For this to work the string can't be concatenated

I'd suggest extracting this into a helper method
Comment 4 Parthiban Balasubramanian 2013-07-29 15:51:36 UTC
Created attachment 250376 [details] [review]
Validate createClass value updated as per review
Comment 5 Jens Georg 2013-08-01 09:14:18 UTC
Pushed with minor changes. It's not necessary to check a GList's length. If
the list is non-null, the length can never be 0, see

https://git.gnome.org/browse/glib/tree/glib/glist.c?h=glib-2-36#n910