diff options
author | j.r | 2022-02-26 23:15:00 +0100 |
---|---|---|
committer | j.r | 2022-02-26 23:16:17 +0100 |
commit | 6a51532a69c6e33e701d7592319111d9192b76f3 (patch) | |
tree | 7a83a1217a1704fa5ebe97f518e39fdd0099a73e /0001-update-dbus-loader-Remove-Loader-from-safe_load.patch | |
parent | a3d8dd29023697e1be28426597498b90f9f03423 (diff) | |
download | aur-6a51532a69c6e33e701d7592319111d9192b76f3.tar.gz |
python-validity: fix YAML loading crash
Diffstat (limited to '0001-update-dbus-loader-Remove-Loader-from-safe_load.patch')
-rw-r--r-- | 0001-update-dbus-loader-Remove-Loader-from-safe_load.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch b/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch new file mode 100644 index 000000000000..13de1c6adac5 --- /dev/null +++ b/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch @@ -0,0 +1,31 @@ +From 8d4a69979cd531f920c9073855fbcb0ca5b81bf1 Mon Sep 17 00:00:00 2001 +From: Takeshi HAMASAKI <hmatrjp@users.sourceforge.jp> +Date: Sat, 14 Aug 2021 08:36:06 +0900 +Subject: [PATCH] update dbus-loader: Remove Loader from safe_load() + +As I commented on the commit c0bf88e, https://github.com/uunicorn/python-validity/commit/c0bf88ea050c446dc12d81a0de8d30a4f81cc797 +python3-validity.service does not start, at least on Debian buster, since +safe_load() does not have arg Loader on its prototype. +Removing Loader here, +config = yaml.safe_load(configfd) +makes it back to normal starting. +--- + dbus_service/dbus-service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbus_service/dbus-service b/dbus_service/dbus-service +index 7a1a1bc..8655547 100755 +--- a/dbus_service/dbus-service ++++ b/dbus_service/dbus-service +@@ -242,7 +242,7 @@ def main(): + # Load and perform basic validation of config file. + try: + with (args.configpath / 'dbus-service.yaml').open(mode='rt') as configfd: +- config = yaml.load(configfd) ++ config = yaml.safe_load(configfd) + except FileNotFoundError: + # No configuration file. Create default + config = {'user_to_sid': {}} +-- +2.35.1 + |