https://github.com/GNOME/glib

sort by:
Revision Author Date Message Commit Date
588b92a Add test for GHmac in FIPS mode This will test a few problems that we hit recently: g_hmac_copy() is broken, https://bugzilla.redhat.com/show_bug.cgi?id=1786538 Crash in g_hmac_update() in FIPS mode, https://bugzilla.redhat.com/show_bug.cgi?id=1971533 Crash when passing -1 length to g_hmac_update() (discovered in #1971533) We'll also test to ensure MD5 fails, and stop compiling the other MD5 tests. 11 March 2024, 21:13:57 UTC
4e84c69 dlopen GnuTLS instead of linking directly I'd like to enable our GnuTLS GHmac patchset in Fedora in order to ensure it is receiving sufficient real-world testing, since we've discovered several bugs thus far. Problem is Fedora has one requirement that RHEL does not: it needs to build glib as a static lib. This is needed by QEMU in Fedora for complicated technical reasons that I don't understand. However, nothing in RHEL needs it. This means we failed to notice that glib2-static is broken in RHEL, because there is no gnutls-static! We could fix this by adding a gnutls-static package, but that seems like overkill, and adding more static libraries where they're not truly necessary is not the direction we want to move in anyway. So instead, let's just dlopen GnuTLS to sidestep this problem entirely. This would not be a good solution for upstream, but upstream has made clear that this patchset is already non-upstreamable, so it will be fine for our purposes. 11 March 2024, 21:09:13 UTC
a9e3f0c Add a gnutls backend for GHmac For RHEL we want apps to use FIPS-certified crypto libraries, and HMAC apparently counts as "keyed" and hence needs to be validated. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1630260 Replaces: https://gitlab.gnome.org/GNOME/glib/merge_requests/897 This is a build-time option that backs the GHmac API with GnuTLS. Most distributors ship glib-networking built with GnuTLS, and most apps use glib-networking, so this isn't a net-new library in most cases. ======================================================================= mcatanzaro note: I've updated Colin's original patch with several enhancements: Implement g_hmac_copy() using gnutls_hmac_copy(), which didn't exist when Colin developed this patch. Removed use of GSlice Better error checking in g_hmac_new(). It is possible for gnutls_hmac_init() to fail if running in FIPS mode and an MD5 digest is requested. In this case, we should return NULL rather than returning a broken GHmac with a NULL gnutls_hmac_hd_t. This was leading to a later null pointer dereference inside gnutls_hmac_update(). Applications are responsible for checking to ensure the return value of g_hmac_new() is not NULL since it is annotated as nullable. Added documentation to indicate this possibility. Properly handle length -1 in g_hmac_update(). This means we've been given a NUL-terminated string and should use strlen(). GnuTLS doesn't accept -1, so let's call strlen() ourselves. Crash the application with g_error() if gnutls_hmac() fails for any reason. This is necessary because g_hmac_update() is not fallible, so we have no way to indicate error. Crashing seems better than returning the wrong result later when g_hmac_get_string() or g_hmac_get_digest() is later called. (Those functions are also not fallible.) Fortunately, I don't think this error should actually be hit in practice. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/903 11 March 2024, 21:07:25 UTC
d6208fb ghmac: Split off wrapper functions into ghmac-utils.c Prep for adding a GnuTLS HMAC implementation; these are just utility functions that call the "core" API. 11 March 2024, 20:46:27 UTC
7480807 Update Brazilian Portuguese translation (cherry picked from commit 36b81fbfb69d4857a8746a6f4cdd7f767e4fa10b) 11 March 2024, 17:02:02 UTC
fcacaf3 Update Galician translation 11 March 2024, 08:21:17 UTC
a2021e4 Update Georgian translation 10 March 2024, 12:30:08 UTC
8067f01 Update Latvian translation 08 March 2024, 21:36:54 UTC
9758db9 Update Latvian translation 08 March 2024, 19:45:10 UTC
cb9b33c Update Italian translation 08 March 2024, 13:38:16 UTC
763cc3b 2.80.0 Signed-off-by: Philip Withnall <pwithnall@gnome.org> 07 March 2024, 21:35:05 UTC
7c90969 Merge branch 'signals-docs' into 'main' docs: Minor improvements to GSignal documentation See merge request GNOME/glib!3956 07 March 2024, 14:45:42 UTC
a60e6be docs: Document that signal connection functions cannot fail The documentation previously implied that they could. That’s not really true though: they can only fail if preconditions fail, i.e. they’re passed invalid input. That’s a programmer error, which is not something we want to encourage people to check for at runtime (e.g. by dynamically checking for a 0 return value). Signed-off-by: Philip Withnall <pwithnall@gnome.org> 07 March 2024, 13:12:07 UTC
fafe1a1 docs: Minor reformatting / gi-docgenification of signals docs This is nowhere near a complete check-through and gi-docgenification of the signals docs, just a few bits I was looking at anyway. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3250 07 March 2024, 13:12:07 UTC
8a640f5 docs: Document signal handler types and arguments It seems this was missing from the documentation (or, at least, not in an obvious place). As spotted on https://discourse.gnome.org/t/calling-g-main-loop-quit-from-a-signal-handler/19785. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 07 March 2024, 13:12:07 UTC
095142f Update Persian translation 06 March 2024, 21:37:21 UTC
d3b2e8f Update Swedish translation 06 March 2024, 18:27:35 UTC
87ee7de Update British English translation 06 March 2024, 14:44:18 UTC
a6dbfcd docs: Slightly rephrase signals docs to not use the first person The rest of the documentation style is to be more indirect, so let’s consistently use that. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 06 March 2024, 13:21:56 UTC
536bdab docs: Add subheadings to signals documentation page Splits the text up a bit and allows linking directly to those subsections. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 06 March 2024, 13:21:30 UTC
e006624 Update Kazakh translation 06 March 2024, 03:01:06 UTC
a767439 Merge branch 'wip/bobby285271/fix-docs-dir' into 'main' docs: Fix building with docs enabled and introspection disabled See merge request GNOME/glib!3955 06 March 2024, 01:12:51 UTC
2c2d55e Merge branch 'wip/bobby285271/native-gi-docgen' into 'main' docs: Specify gi-docgen as a native dependency See merge request GNOME/glib!3953 06 March 2024, 01:12:47 UTC
dd97c88 docs: Fix building with docs enabled and introspection disabled We install gvariant-specification-1.0.html to `docs_dir` but that shouldn't require `enable_gir`. Fixes: docs/reference/glib/meson.build:26:16: ERROR: Unknown variable "docs_dir" Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3955> 05 March 2024, 16:45:21 UTC
c7476cd docs: Specify gi-docgen as a native dependency gi-docgen is supposed to be ran natively on the build machine. Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3953> 05 March 2024, 14:23:01 UTC
04abb73 Merge branch 'wip/smcv/warn-if-fail' into 'main' g_warn_if_fail: Document as always evaluating expr See merge request GNOME/glib!3951 05 March 2024, 12:25:42 UTC
e11d886 Update Slovenian translation 05 March 2024, 11:49:43 UTC
88c76b8 g_warn_if_fail: Document as always evaluating expr Signed-off-by: Simon McVittie <smcv@collabora.com> 05 March 2024, 11:06:10 UTC
0211f06 Update Slovenian translation 04 March 2024, 21:34:16 UTC
a5dcd47 Update Hungarian translation 04 March 2024, 10:52:21 UTC
dfa3d51 Update Lithuanian translation 03 March 2024, 20:35:17 UTC
73d523b Update Turkish translation 03 March 2024, 18:34:45 UTC
06c173e Update Norwegian Bokmål translation 03 March 2024, 14:45:17 UTC
cab1d3d Update Chinese (China) translation 03 March 2024, 09:57:03 UTC
e00ef0a Update Hebrew translation 02 March 2024, 22:17:15 UTC
4e6f7c6 Update Russian translation 02 March 2024, 19:48:52 UTC
811b4c9 Update Basque translation 01 March 2024, 19:01:58 UTC
92aed1b Update Persian translation 01 March 2024, 17:06:24 UTC
d72129b Merge branch 'macros-docs-fix' into 'main' docs: Fix a typo in the macros docs page See merge request GNOME/glib!3947 01 March 2024, 13:29:22 UTC
9249dc6 Merge branch 'check-missing-install-tag-valgrind' into 'main' tests: Don’t run check-missing-install-tag.py test under valgrind See merge request GNOME/glib!3940 01 March 2024, 13:15:10 UTC
dd2861c Merge branch '3271-string-fix-again' into 'main' gfileutils: Use g_format_size() for another translatable string Closes #3271 See merge request GNOME/glib!3948 01 March 2024, 12:21:42 UTC
704d0bb gfileutils: Use g_format_size() for another translatable string As with commit a3c2691c235fa0978167ffba095631d41043be9a, another instance of the same pattern was missed. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3271 01 March 2024, 11:57:50 UTC
83137c8 Update Persian translation 29 February 2024, 20:17:33 UTC
1856723 Update Ukrainian translation 29 February 2024, 18:20:49 UTC
9ed0ce2 docs: Fix a typo in the macros docs page Signed-off-by: Philip Withnall <pwithnall@gnome.org> 29 February 2024, 13:58:53 UTC
8c92fa1 Update Spanish translation 29 February 2024, 11:39:56 UTC
8618f50 Merge branch 'wip/smcv/cli-placeholders' into 'main' Add missing argument placeholders to several command-line tools See merge request GNOME/glib!3946 29 February 2024, 10:39:53 UTC
4f555c0 Update Hebrew translation 29 February 2024, 06:48:55 UTC
6aaf88e Update British English translation 28 February 2024, 12:29:55 UTC
90075e4 Update British English translation (cherry picked from commit 557f0d94427d85eae146889d03d66755c56bbe34) 28 February 2024, 11:46:09 UTC
fb4b780 glib-compile-resources: Provide placeholders for options with an argument If we don't do this, the --help text is formatted as though the option did not expect an argument. IDENTIFIER is a new translated string, but it is developer-oriented, so a missing translation is not particularly bad. COMMAND is already present in translations. Signed-off-by: Simon McVittie <smcv@collabora.com> 28 February 2024, 11:28:00 UTC
5622a4a gdbus: Add command-line placeholder for ADDRESS If we don't do this, the --help text is formatted as though the option did not expect an argument. This introduces a new translated string, but it is developer-oriented, so a missing translation is not particularly bad. Signed-off-by: Simon McVittie <smcv@collabora.com> 28 February 2024, 11:27:21 UTC
1a8e222 girepository: Provide placeholders for positional parameters Otherwise, correct invocation isn't clear from the --help output. This does not introduce new translated strings: FILE was already translated. Signed-off-by: Simon McVittie <smcv@collabora.com> 28 February 2024, 11:27:15 UTC
9541b43 girepository: Provide placeholders for --includedir If we don't do this, the --help text is formatted as though the option did not expect an argument. This does not introduce new translated strings: DIRECTORY was already translated. Signed-off-by: Simon McVittie <smcv@collabora.com> 28 February 2024, 11:26:59 UTC
3904549 Update Spanish translation 28 February 2024, 11:10:22 UTC
a91d2f8 Update Czech translation 27 February 2024, 23:04:45 UTC
4bebd4d Update Ukrainian translation 27 February 2024, 17:54:24 UTC
5214fd7 Update Georgian translation 27 February 2024, 17:20:13 UTC
c13744a Update Chinese (China) translation 27 February 2024, 16:48:40 UTC
0d31fc6 2.79.3 Signed-off-by: Philip Withnall <pwithnall@gnome.org> 27 February 2024, 10:11:38 UTC
972db82 Merge branch 'girepository-tool-translation' into 'main' girepository: Add translation support to utility tools Closes #3263 See merge request GNOME/glib!3941 27 February 2024, 09:41:03 UTC
def7de3 Merge branch '3271-size-format' into 'main' gfileutils: Use g_format_size() for a translatable string Closes #3271 See merge request GNOME/glib!3943 27 February 2024, 09:32:13 UTC
fca9568 Merge branch '3266-connection-attempt-unref-order' into 'main' gsocketclient: Fix a use-after-free in g_socket_client_connected_callback() Closes #3266 See merge request GNOME/glib!3944 27 February 2024, 09:17:13 UTC
a3c2691 gfileutils: Use g_format_size() for a translatable string Partially because the use of `G_GSIZE_MODIFIER` breaks translatable string extraction (issue #3271) and partially because `g_format_size()` produces more human-readable results anyway. Prior to commit cf5e371c67 the code was using `%lu`, so this is a fairly new issue. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3271 27 February 2024, 09:14:22 UTC
9a661ab gsocketclient: Fix a use-after-free in g_socket_client_connected_callback() The ref held by `data->task` may be the last one on the `GTask`. The `GTask` stores `attempt->data` as its task data, and so when the `GTask` is finalised, `attempt->data` is too. `connection_attempt_remove()` needs to access `attempt->data`, so must be called before the `g_object_unref()` in this situation. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3266 27 February 2024, 09:03:03 UTC
bd17a09 girepository: Combine input file validation code paths in utilities The code and strings are the same, so let’s simplify things and reduce LoC for no functional change. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 26 February 2024, 18:10:56 UTC
08b3f14 compiler: Correctly use g_strerror() instead of strerror() This ensures the return value is always UTF-8. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 26 February 2024, 18:10:56 UTC
57a8834 girepository: Add translation support to utility tools This fixes a few formatting and newline issues in the strings at the same time, but nothing major. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3263 26 February 2024, 18:10:56 UTC
c69dddd tests: Don’t run check-missing-install-tag.py test under valgrind Like in commit 80e878005f38c5f30dd8cf073a06b995caf6eb30, running this test under valgrind is not useful. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 26 February 2024, 18:10:06 UTC
5b022f9 Merge branch 'pcre-lookbehind' into 'main' tests: Remove variable-length lookbehind tests for GRegex See merge request GNOME/glib!3945 26 February 2024, 18:07:17 UTC
ca4e6f8 Merge branch 'wip/oholy/gvolumemonitor-leak' into 'main' gcontextspecificgroup: Wait until stop_func is done Closes #3258 See merge request GNOME/glib!3934 26 February 2024, 18:06:45 UTC
cce3ae9 tests: Remove variable-length lookbehind tests for GRegex PCRE2 10.43 has now introduced support for variable-length lookbehind, so these tests now fail if GLib is built against PCRE2 10.43 or higher. See https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94. Rather than making the tests conditional on the version of PCRE2 in use, just remove them. They are mostly testing the PCRE2 code rather than any code in GLib, so don’t have much value. This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2 days ago. Signed-off-by: Philip Withnall <pwithnall@gnome.org> 26 February 2024, 16:55:44 UTC
65c64ea Updated Spanish translation 26 February 2024, 14:03:53 UTC
32a60a7 Merge branch 'macos_origin_only' into 'main' Restrict macOS CI to origin See merge request GNOME/glib!3935 26 February 2024, 10:58:05 UTC
c9d3295 Merge branch 'girepository-static' into 'main' girepository: Fix static build under Windows See merge request GNOME/glib!3937 26 February 2024, 10:55:21 UTC
cae2887 Merge branch 'fix-issue-3080' into 'main' GWinHttpFile: Check for matching attributes before sending HTTP(S) request Closes #3080 See merge request GNOME/glib!3936 26 February 2024, 10:51:44 UTC
fe461fd Update Latvian translation 25 February 2024, 11:02:14 UTC
63ff7c9 Update Indonesian translation 25 February 2024, 06:40:55 UTC
714c8e9 Update Kazakh translation 24 February 2024, 17:48:18 UTC
e06b8a4 Update Persian translation 24 February 2024, 13:10:18 UTC
2ee09b8 Update Chinese (China) translation 22 February 2024, 15:40:17 UTC
72d7692 girepository: Fix static build under Windows Properly define `GI_STATIC_COMPILATION` when static build is enabled. Use `library()` instead of `shared_library()` to allow selecting static builds. 21 February 2024, 11:38:40 UTC
4337f8f GWinHttpFile: Check for matching attributes before sending the HTTP(S) request We might not need to make an HTTP(S) request at all Fixes #3080 21 February 2024, 10:56:36 UTC
c515f79 GWinHttpFile: Set display-name and type at the start of the query_info() function Those attributes do not need the HTTP(S) request data, so just set them right away. 21 February 2024, 10:52:36 UTC
241df32 Update Georgian translation 20 February 2024, 21:48:00 UTC
bf7d941 gcontextspecificgroup: Wait until stop_func is done Currently, the `stop_func` is executed on an extra thread, and the `g_context_specific_group_remove` function returns before the `stop_func` finishes. It may happen that the `stop_func` is never executed if the program terminates soon after calling it. Let's wait until the `stop_func` is done. Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/3258 20 February 2024, 12:39:31 UTC
f1758b1 Update Hebrew translation 19 February 2024, 20:50:46 UTC
3e80909 ci: Run macOS job only for origin This partially reverts 11616b01459f56e8c9a6aa98a207f915593f6faa. The macOS runner is not available to forks on purpose. 19 February 2024, 18:29:35 UTC
41dc64c Update Catalan translation 19 February 2024, 18:28:44 UTC
ad0bc52 Update Slovenian translation 19 February 2024, 16:05:43 UTC
a63fc70 Update Persian translation 19 February 2024, 13:38:04 UTC
214da88 Update Basque translation 18 February 2024, 20:05:55 UTC
ab880c6 Update Galician translation 18 February 2024, 19:52:38 UTC
b4b319d Update Turkish translation 18 February 2024, 15:38:20 UTC
bd8662e Update Lithuanian translation 18 February 2024, 10:31:22 UTC
dfdd97e Update Turkish translation 18 February 2024, 09:20:05 UTC
85528ac Update Hebrew translation 17 February 2024, 21:44:30 UTC
0fb6f31 Update Hebrew translation 17 February 2024, 21:37:06 UTC
36d40eb Update Persian translation 15 February 2024, 22:22:14 UTC
4f54355 Merge branch '3262-msys2-meson-intermittent-failure' into 'main' ci: Use Meson version from pacman on msys2 CI runners Closes #3262 See merge request GNOME/glib!3932 15 February 2024, 21:56:11 UTC
back to top