~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/ec2/client.py

  • Committer: kapil.thangavelu at canonical
  • Date: 2011-08-19 16:09:39 UTC
  • mto: (96.1.1 txaws) (91.2.10 fix-s3-port)
  • mto: This revision was merged to the branch mainline in revision 99.
  • Revision ID: kapil.thangavelu@canonical.com-20110819160939-icpzt1p5pqp72z4a
work around for openstack group ip permissions output

Show diffs side-by-side

added added

removed removed

Lines of Context:
658
658
            if ip_permissions is None:
659
659
                ip_permissions = ()
660
660
            for ip_permission in ip_permissions:
 
661
 
 
662
                # openstack doesn't handle self authorized groups properly
 
663
                # XXX this is an upstream problem and should be addressed there
 
664
                # lp bug #829609
661
665
                ip_protocol = ip_permission.findtext("ipProtocol")
662
 
                from_port = int(ip_permission.findtext("fromPort"))
663
 
                to_port = int(ip_permission.findtext("toPort"))
 
666
                from_port = ip_permission.findtext("fromPort")
 
667
                to_port = ip_permission.findtext("toPort")
 
668
 
 
669
                if from_port:
 
670
                    from_port = int(from_port)
 
671
 
 
672
                if to_port:
 
673
                    to_port = int(to_port)
 
674
 
664
675
                for groups in ip_permission.findall("groups/item") or ():
665
676
                    user_id = groups.findtext("userId")
666
677
                    group_name = groups.findtext("groupName")