From fcdfa8d1673818f7d81aedefbe11617739bca78d Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Fri, 31 Jan 2020 12:58:11 +0100 Subject: [PATCH] Fix an invalid logical operator closes #6077 https://pulp.plan.io/issues/6077 --- CHANGES/6077.bugfix | 1 + pulpcore/app/models/content.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES/6077.bugfix diff --git a/CHANGES/6077.bugfix b/CHANGES/6077.bugfix new file mode 100644 index 0000000000..2b5da7bd53 --- /dev/null +++ b/CHANGES/6077.bugfix @@ -0,0 +1 @@ +Fix a bug that could cause an inability to detect an invalid signing script during the validation diff --git a/pulpcore/app/models/content.py b/pulpcore/app/models/content.py index a50f0e889b..7cd73ed9b1 100644 --- a/pulpcore/app/models/content.py +++ b/pulpcore/app/models/content.py @@ -430,7 +430,7 @@ def save(self, *args, **kwargs): import_result = gpg.import_keys(key.read()) verified = gpg.verify_file(fp, temp_file.name) if verified.trust_level is None \ - and verified.trust_level < verified.TRUST_FULLY: + or verified.trust_level < verified.TRUST_FULLY: raise RuntimeError( "A signature could not be verified or a trust level is too low. " "The signing script may generate invalid signatures."