Fix service validator, ensure the service isn't blank.

ticket 961
This commit is contained in:
Rob Crittenden 2011-02-15 12:37:25 -05:00
parent 57b36ae65d
commit f558ffe294

View File

@ -125,6 +125,10 @@ def split_principal(principal):
raise errors.MalformedServicePrincipal(reason='missing service')
service = sp[0]
if len(service) == 0:
raise errors.MalformedServicePrincipal(
reason='blank service'
)
sr = sp[1].split('@')
if len(sr) > 2:
raise errors.MalformedServicePrincipal(