Skip to content

Commit e7cbbd8

Browse files
committed
Removed max 8192 bytes, fixes #8424
1 parent 10011b3 commit e7cbbd8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packaging/rpm_key

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ import os.path
6565
import re
6666
import tempfile
6767

68-
# Attempt to download at most 8192 bytes.
69-
# Should be more than enough for all keys
70-
MAXBYTES = 8192
71-
7268
def is_pubkey(string):
7369
"""Verifies if string is a pubkey"""
7470
pgp_regex = ".*?(-----BEGIN PGP PUBLIC KEY BLOCK-----.*?-----END PGP PUBLIC KEY BLOCK-----).*"
@@ -118,11 +114,11 @@ class RpmKey:
118114
module.exit_json(changed=False)
119115

120116

121-
def fetch_key(self, url, maxbytes=MAXBYTES):
117+
def fetch_key(self, url):
122118
"""Downloads a key from url, returns a valid path to a gpg key"""
123119
try:
124120
rsp, info = fetch_url(self.module, url)
125-
key = rsp.read(maxbytes)
121+
key = rsp.read()
126122
if not is_pubkey(key):
127123
self.module.fail_json(msg="Not a public key: %s" % url)
128124
tmpfd, tmpname = tempfile.mkstemp()

0 commit comments

Comments
 (0)