= Cross-Site Scripting, or XSS, when changing contact address = The contact address field and its related messages are properly escaped in order to prevent XSS. >>> admin_browser.open( ... 'http://launchpad.dev/~guadamen/+contactaddress') >>> admin_browser.getControl('Another e-mail address').selected = True >>> admin_browser.getControl(name='field.contact_address').value = ( ... '') >>> admin_browser.getControl('Change').click() The value can be obtained correctly, which indicates that the markup is parse-able: >>> admin_browser.getControl(name='field.contact_address').value '' The markup is valid and correctly escaped: >>> print find_tag_by_id( ... admin_browser.contents, 'field.contact_address').prettify() The error message is also valid and correctly escaped: >>> for tag in find_tags_by_class(admin_browser.contents, 'message'): ... print tag.prettify()
The script we tried to inject is not present, unescaped, anywhere in the page: >>> '' in admin_browser.contents False