Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1a79d9ae
Commit
1a79d9ae
authored
Oct 16, 2013
by
Maykel Moya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apt_key: Validate key_id and accept a leading '0x'
parent
afa781d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
library/packaging/apt_key
+10
-4
No files found.
library/packaging/apt_key
View file @
1a79d9ae
...
...
@@ -76,10 +76,10 @@ EXAMPLES = '''
# Remove an Apt signing key, uses whichever key is at the URL
- apt_key: url=https://ftp-master.debian.org/keys/archive-key-6.0.asc state=absent
# Remove a Apt specific signing key
- apt_key: id=473041FA state=absent
# Remove a Apt specific signing key
, leading 0x is valid
- apt_key: id=
0x
473041FA state=absent
# Add a key from a file on the Ansible server
# Add a key from a file on the Ansible server
- apt_key: data="{{ lookup('file', 'apt.gpg') }}" state=present
# Add an Apt signing key to a specific keyring file
...
...
@@ -187,7 +187,13 @@ def main():
keyring
=
module
.
params
[
'keyring'
]
state
=
module
.
params
[
'state'
]
changed
=
False
try
:
_
=
int
(
key_id
,
16
)
key_id
=
key_id
.
lstrip
(
'0x'
)
except
ValueError
:
module
.
fail_json
(
"Invalid key_id"
)
# FIXME: I think we have a common facility for this, if not, want
check_missing_binaries
(
module
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment