~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/payload.py

  • Committer: kapil.thangavelu at canonical
  • Date: 2011-09-22 20:17:22 UTC
  • mfrom: (91.2.10 fix-s3-port)
  • mto: This revision was merged to the branch mainline in revision 99.
  • Revision ID: kapil.thangavelu@canonical.com-20110922201722-l4plcnk5wrr7eten
merge fix-s3-port-and-bucket-op [a=hazmat,jimbaker,spampas][r=therve][f=829609,824403]

Openstack compatibiity fixes.

 - S3 bucket operations use a trailing slash.
 - S3 Host and port are now configurable.
 - Security group parsing is now more forgiving.

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
""" % (version.ec2_api,)
179
179
 
180
180
 
 
181
sample_describe_security_groups_with_openstack = """\
 
182
<?xml version="1.0"?>
 
183
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
 
184
  <requestId>7d4e4dbd-0a33-4d3a-864a-b5ce0f1c9cbf</requestId>
 
185
  <securityGroupInfo>
 
186
    <item>
 
187
      <ipPermissions>
 
188
        <item>
 
189
          <toPort>22</toPort>
 
190
          <ipProtocol>tcp</ipProtocol>
 
191
          <ipRanges>
 
192
             <item><cidrIp>0.0.0.0/0</cidrIp></item>
 
193
          </ipRanges>
 
194
          <groups/>
 
195
          <fromPort>22</fromPort>
 
196
        </item>
 
197
        <item>
 
198
         <toPort/>
 
199
         <ipProtocol/>
 
200
         <ipRanges/>
 
201
         <groups>
 
202
            <item>
 
203
              <groupName>WebServers</groupName>
 
204
              <userId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</userId>
 
205
            </item>
 
206
         </groups>
 
207
         <fromPort/>
 
208
        </item>
 
209
      </ipPermissions>
 
210
      <groupName>WebServers</groupName>
 
211
      <groupDescription>Web servers</groupDescription>
 
212
      <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>
 
213
    </item>
 
214
  </securityGroupInfo>
 
215
</DescribeSecurityGroupsResponse>
 
216
""" % (version.ec2_api,)
 
217
 
181
218
sample_describe_security_groups_result = """\
182
219
<?xml version="1.0"?>
183
220
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/%s/">