wave16: nova/keystone/crystal/dovecot/wireshark CWE-407 patches + unit tests
nova-0001: scheduler/manager.py selected_hosts list → set (273x, CRITICAL) nova-0002: scheduler/host_manager.py lowered_hosts_to_force list → set (43x, HIGH) keystone-0001: api/users.py token_roles list → set (32x, HIGH) crystal-0001: syntax/parser.cr type_vars Array#includes? → Set (25x, CRITICAL) crystal-0002: semantic/restrictions.cr discarded Array#includes? → Set (5x, CRITICAL) dovecot-0001: mail-storage-hooks.c array_lsearch → sort+bsearch (4x, HIGH) wireshark-0001: proto_data.c GSList → wmem_map_t (8x, HIGH) 7 unit tests: 9/9 PASS
This commit is contained in:
parent
291620b115
commit
59ae52c7b4
12 changed files with 724 additions and 177 deletions
14
defects/keystone/patch/keystone-0001-token-roles-set.patch
Normal file
14
defects/keystone/patch/keystone-0001-token-roles-set.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- a/keystone/api/users.py
|
||||
+++ b/keystone/api/users.py
|
||||
@@ -663,7 +663,7 @@ class UsersResource(ks_flask.ResourceBase):
|
||||
# credential users from escallating their privileges to include
|
||||
# additional roles that the trustor or application credential
|
||||
# creator has assigned on the project.
|
||||
- token_roles = [r['id'] for r in token.roles]
|
||||
+ token_role_ids = {r['id'] for r in token.roles}
|
||||
for role in roles:
|
||||
- if role['id'] not in token_roles:
|
||||
+ if role['id'] not in token_role_ids:
|
||||
detail = _(
|
||||
'Cannot create an application credential with '
|
||||
'unassigned role'
|
||||
Loading…
Add table
Add a link
Reference in a new issue