Skip to content

Commit

Permalink
Merge branch 'mdhash-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
juhanurmi committed Aug 2, 2017
2 parents ce6312e + 99922f6 commit 4a21200
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ahmia/ahmia/validators.py
Expand Up @@ -45,7 +45,10 @@ def validate_onion_url(url):
raise ValidationError(
_(u'%(url)s is not ending with .onion/') % {'url': url}
)
if not validate_onion(url[7:-7]):
main_dom = url.find('.');
if main_dom == 23:
main_dom = 6
if not validate_onion(url[main_dom+1:-7]):
raise ValidationError(
_(u'%(url)s is not valid onion domain') % {'url': url}
)
Expand Down

0 comments on commit 4a21200

Please sign in to comment.