a207f67f73
An Endless OS system was found in the wild with a malformed .local/share/gnome-shell/notifications. When deserialized in Python, after passing trusted=True to g_variant_new_from_bytes(), the first element of the first struct in the array looks like this: In [41]: _38.get_child_value(0).get_child_value(0) Out[41]: GLib.Variant('s', '\Uffffffff\Uffffffff\Uffffffff\Uffffffff\Uffffffff') When deserialised in GJS, we get: gjs> v.get_child_value(0).get_child_value(0) [object variant of type "s"] gjs> v.get_child_value(0).get_child_value(0).get_string() typein:43:1 malformed UTF-8 character sequence at offset 0 @typein:43:1 @<stdin>:1:34 While g_variant_new_from_bytes() doesn't have much to say about its 'trusted' parameter, g_variant_new_from_data() does: > If data is trusted to be serialised data in normal form then trusted > should be TRUE. This applies to serialised data created within this > process or read from a trusted location on the disk (such as a file > installed in /usr/lib alongside your application). You should set > trusted to FALSE if data is read from the network, a file in the > user's home directory, etc. Persistent state is read from the user's home directory, so it should not be trusted. With trusted=False, the string value above comes out as "". I don't have an explanation for how this file ended up being malformed. I also don't have an explanation for when this started crashing: my guess is that recent GJS became stricter about validating UTF-8 but I could be wrong! https://gitlab.gnome.org/GNOME/gnome-shell/issues/1552 |
||
---|---|---|
.gitlab-ci | ||
.settings | ||
data | ||
docs/reference | ||
js | ||
lint | ||
man | ||
meson | ||
po | ||
src | ||
subprojects | ||
test | ||
tests | ||
tools | ||
.eslintrc.json | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
cldr2json.py | ||
config.h.meson | ||
COPYING | ||
gnome-shell.doap | ||
HACKING.md | ||
meson_options.txt | ||
meson.build | ||
NEWS | ||
README.md | ||
README.mdwn |
GNOME Shell
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.
For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.
Bugs should be reported to the GNOME bug tracking system.
Contributing
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.