[Openstack-security] [Bug 1472057] Re: in the function of create_trust,the judgment for “remaining_uses” can be deleted

Dolph Mathews 1472057 at bugs.launchpad.net
Thu Jul 9 17:16:49 UTC 2015


Oh, I think I misunderstood this on the first read. You're just saying that this line:
 
  if remaining_uses is not None and remaining_uses <= 0:

... could be simplified?

There doesn't seem to be any security implication with that.

** Information type changed from Public Security to Public

** Tags removed: security

** Changed in: keystone
   Importance: High => Low

** Changed in: keystone
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of OpenStack
Security, which is subscribed to OpenStack.
https://bugs.launchpad.net/bugs/1472057

Title:
  in the function of create_trust,the judgment for “remaining_uses” can
  be deleted

Status in OpenStack Identity (Keystone):
  Incomplete

Bug description:
  In the function of create_trust (Corresponding file is:/keystone/trust/core.py),the judgment for “remaining_uses” can be deleted,
  because controller has registered a schema to validate a resource reference.

  if not redelegatable:
              trust['redelegation_count'] = requested_count = 0
              remaining_uses = trust.get('remaining_uses')
              if remaining_uses is not None and remaining_uses <= 0:  # i think this judgment redundancy
                  msg = _('remaining_uses must be a positive integer or null.')
                  raise exception.ValidationError(msg)

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1472057/+subscriptions




More information about the Openstack-security mailing list