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 619588 - User's Real names should be escaped against XML markup
User's Real names should be escaped against XML markup
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
: 616584 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-05-25 09:17 UTC by Milan Bouchet-Valat
Modified: 2010-06-17 00:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Don't crash on markup parse failure (2.41 KB, patch)
2010-06-11 05:48 UTC, William Jon McCann
committed Details | Review
Escape names before showing in markup (1.94 KB, patch)
2010-06-11 05:48 UTC, William Jon McCann
committed Details | Review

Description Milan Bouchet-Valat 2010-05-25 09:17:42 UTC
If one user on the system has a Real name containing XML markup like & or <, the users list behaves badly. Sometimes you get twice the same user name.

This seems to be because the string isn't escaped when it's passed to the GtkCellRendererText. /var/log/gdm/:0-greeter.log contains many errors like:
> gdm-simple-greeter[1189]: Gtk-WARNING: Failed to set text from markup
> due to error parsing markup: Error on line 1, character 18 :
> « Test&2< » isn't a valid name: « & » 

Real names can contain almost any char, so better escape the string with g_markup_printf_escaped() or g_markup_escape_text (). That's what I'm now doing in users-admin.


(This is gdm 2.30.2 in Ubuntu 10.04.)
Comment 1 William Jon McCann 2010-06-11 05:48:00 UTC
Created attachment 163360 [details] [review]
Don't crash on markup parse failure
Comment 2 William Jon McCann 2010-06-11 05:48:03 UTC
Created attachment 163361 [details] [review]
Escape names before showing in markup
Comment 3 Milan Bouchet-Valat 2010-06-11 10:06:57 UTC
Thanks, Jon!
Comment 4 William Jon McCann 2010-06-17 00:21:44 UTC
*** Bug 616584 has been marked as a duplicate of this bug. ***