Comments (7)
Additional info: I actually use django_cas_ng on two sites, and this problem is only happening on one of them.
Python 2.7 + Django 1.8.2 = broken
Python 3.5 + Django 1.9.1 = working
from django-cas-ng.
working fine with v3.5.3 + python 2.7 + Django 1.7.7
from django-cas-ng.
Hmm, interesting. It definitely broke for me on update. Our implementation is very straightforward - nothing fancy. The only settings I'm using are:
CAS_SERVER_URL = 'https://cas.ourdomain.edu/cas/login'
CAS_ADMIN_PREFIX = '/admin'
CAS_LOGOUT_COMPLETELY = True
CAS_REDIRECT_URL = '/'
If this is a result of a bug elsewhere in our project code, I don't know where to begin to look. Ideas?
from django-cas-ng.
right now, I really don't known. There is a lot of changes since v3.4.2 (the main one I think being putting all CAS logic in a external lib https://github.com/python-cas/python-cas). I'll try tomorrow on Django 1.8.2 to see if I can reproduce the bug.
from django-cas-ng.
sorry but I cannot reproduce
mkdir /tmp/testcas
virtualenv /tmp/testcas
. /tmp/testcas/bin/activate
pip install Django==1.8.2
pip install django-cas-ng
cd /tmp/testcas/
django-admin startproject testproject
# setup django-cas-ng by editing testproject/settings.py and testproject/urls.py
django-admin startapp testapp
# add testapp to testproject/settings.py and testproject/urls.py and setup a trivial view
My trivial view is
from django.contrib.auth.decorators import login_required
@login_required
def test(request):
raise ValueError("username: %s is auth %s" % (request.user, request.user.is_authenticated()))
And it effectively raise my current username and True and not AnonymousUser.
for info :
$ pip freeze
Django==1.8.2
argparse==1.2.1
django-cas-ng==3.5.3
python-cas==1.1.0
six==1.10.0
wsgiref==0.1.2
Just note that your CAS_SERVER_URL
should probably be 'https://cas.ourdomain.edu/cas/'
without the login
but I do not think it really matter as I have tested too with a /login
in my CAS url and it worked just fineβ¦
from django-cas-ng.
Interesting. Well, thank you very much for investigating! I'm not sure where to begin troubleshooting this one, but at this point it appears to definitely be somehow related to my codebase. I'll close this and leave a comment in the future when I figure it out. Thanks.
from django-cas-ng.
I had the same issue,
python 2
Django 1.8
django-cas-ng 3.5.3
Unsure of what exactly the problem was, but commenting/removing the following lines fixed the issue: https://github.com/mingchen/django-cas-ng/blob/master/django_cas_ng/views.py#L64-65
Not saying its a good idea, but it worked for me.
from django-cas-ng.
Related Issues (20)
- djangocas.dev website links to old changelog HOT 1
- CAS_CHECK_NEXT no longer supports callable? HOT 1
- DataError at /accounts/login/ value too long for type character varying(255)
- Exception Value: mismatched tag: line 50, column 75
- Invalid next URLs in login causes a server error HOT 2
- Not an issue , but a doubt , so the user attributes from django mama cas are contained in the st ticket and they get loaded into user table ? HOT 1
- Failed when `python manage.py migrate` HOT 3
- Django >= 3.2.7 requires new migration script HOT 2
- Single Logout ignores `CAS_ROOT_PROXIED_AS` setting
- Please make a release HOT 2
- ParseError: not well-formed (invalid token): line 1, column 854 HOT 1
- Can't request XML content using by requests HOT 1
- CAS Affiliation support HOT 2
- django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes') HOT 5
- Redirect url error when passing absolute rute to next param on logout view
- CAS_APPLY_ATTRIBUTES_TO_USER does not appear to add any attributes to user HOT 2
- doc: `CAS_ADMIN_REDIRECT` is not documented HOT 1
- Live Demo on https://djangocas.dev is not working
- Documentation changelog not updated
- [solved][nobug] CAS_USERNAME_ATTRIBUTE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-cas-ng.