login error: hostname doesn't match .... but it does!!!

66 views
Skip to first unread message

bwv549

unread,
Mar 31, 2015, 6:55:51 PM3/31/15
to django...@googlegroups.com
Just trying to login a new user, but I'm getting this error, which makes no sense to me because it looks like it should match:

Login error (https://www.jtprince.dev.doba.com/new-login.html) -- Exception: hostname 'www.jtprince.dev.doba.com' doesn't match either of '*.doba.com', 'doba.com' -- Result: None

ALLOWED_HOSTS = [
    '.doba.com',
    '.doba.com.',
]

What kinds of things should I try to get past this?

Thanks!

Mike Dewhirst

unread,
Mar 31, 2015, 7:40:27 PM3/31/15
to django...@googlegroups.com
Maybe get rid of the second item in the list. I don't think you need the
trailing dot.

I would put in the full hostname to prove it works then sequentially
remove bits until the problem is revealed.

ALLOWED_HOSTS = [
'www.jtprince.dev.doba.com',
'.jtprince.dev.doba.com',
'.dev.doba.com',
'.doba.com',
]

Just a stab in the dark really ...

Mike


>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7e279169-5359-45f2-93f4-4a713c6356c7%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7e279169-5359-45f2-93f4-4a713c6356c7%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Stephen J. Butler

unread,
Mar 31, 2015, 8:50:37 PM3/31/15
to django...@googlegroups.com
This error doesn't appear in the Django sources for 1.6 or 1.7. I
don't think the error is being generated by Django, so ALLOWED_HOSTS
isn't the culprit. Plus, another clue is that "*.doba.com" isn't an
actual value in your ALLOWED_HOSTS.

If you search it appears related to Python SSL. Do you have an
authentication backend (like an LDAP module) connecting over SSL? I
think that's what's choking. Probably an error with SNI or SAN on the
certificate. But why Python SSL doesn't think the host matches the
wildcard is another mystery.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7e279169-5359-45f2-93f4-4a713c6356c7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages