Forbid non-stripped endpoint urls

Endpoint urls should not start with a whitespace character.

Change-Id: Ia8f998a0ca0e6249acbe23b1f8f1f894fae8123a
Closes-Bug: 1506594
This commit is contained in:
Boris Bobrov 2015-10-16 16:03:29 +03:00
parent 0fef62167d
commit 9dbc5ca16b
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ url = {
# NOTE(edmondsw): we could do more to validate per various RFCs, but
# decision was made to err on the side of leniency. The following is based
# on rfc1738 section 2.1
'pattern': '[a-zA-Z0-9+.-]+:.+'
'pattern': '^[a-zA-Z0-9+.-]+:.+'
}
email = {

View File

@ -90,7 +90,7 @@ _VALID_URLS = ['https://example.com', 'http://EXAMPLE.com/v3',
_INVALID_URLS = [False, 'this is not a URL', 1234, 'www.example.com',
'localhost', 'http//something.com',
'https//something.com']
'https//something.com', ' http://example.com']
_VALID_FILTERS = [{'interface': 'admin'},
{'region': 'US-WEST',