kstateome / django-cas

K-State's maintained version of django-cas
MIT License
111 stars 83 forks source link

HTTPS Logout Bug #54

Closed epicserve closed 8 years ago

epicserve commented 8 years ago

It seems like when using HTTPS it doesn't display the correct url to click on the CAS site to log back in. For example if the site is https://example.com/ and you sign out the CAS site will display http://example.com/http://example.com/ for the link to click to log back in. Using https://ngrok.com/ so I could debug https locally, I was able to trace down where the bug happens. It seems like it happens in the _redirect_url function found in cas/views.py. I was able to get around the bug by adding the following settings:

CAS_IGNORE_REFERER = True
CAS_REDIRECT_URL = '/'
dstegelman commented 8 years ago

Sorry for taking so long to get to this, been fairly busy.

The redirect_url uses django's is_secure() on the request to determine http/https when creating URLs. I'll play around with it and see if I can get tests to fail for this situation.

dstegelman commented 8 years ago

I am not able to reproduce this.

epicserve commented 8 years ago

@dstegelman, We're not using CAS anymore so I don't have an easy way to get your more details either.