From a5c112f532f585f8a05568215c5c9179e0748f12 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Mon, 21 Apr 2025 17:00:30 +0200 Subject: [PATCH 1/5] Update README badges --- README.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index d144efa..48ce256 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ CAS Server ########## -|travis| |coverage| |licence| |github_version| |pypi_version| |codacy| |doc| +|gh_action| |coverage| |licence| |github_version| |pypi_version| |doc| CAS Server is a Django application implementing the `CAS Protocol 3.0 Specification `_. @@ -675,8 +675,8 @@ You could for example do as below:: -.. |travis| image:: https://badges.genua.fr/travis/com/nitmir/django-cas-server/master.svg - :target: https://travis-ci.com/nitmir/django-cas-server +.. |gh_action| image:: https://badges.genua.fr/github/actions/workflow/status/nitmir/django-cas-server/github-actions.yml?branch=master + :target: https://github.com/nitmir/django-cas-server/actions/workflows/github-actions.yml?query=branch%3Amaster .. |pypi_version| image:: https://badges.genua.fr/pypi/v/django-cas-server.svg :target: https://pypi.org/project/django-cas-server/ @@ -687,10 +687,7 @@ You could for example do as below:: .. |licence| image:: https://badges.genua.fr/pypi/l/django-cas-server.svg :target: https://www.gnu.org/licenses/gpl-3.0.html -.. |codacy| image:: https://badges.genua.fr/codacy/grade/255c21623d6946ef8802fa7995b61366/master.svg - :target: https://www.codacy.com/app/valentin-samir/django-cas-server - -.. |coverage| image:: https://intranet.genua.fr/coverage/badge/django-cas-server/master.svg +.. |coverage| image:: https://badges.genua.fr/coverage/badge/django-cas-server/master.svg :target: https://badges.genua.fr/coverage/django-cas-server/master .. |doc| image:: https://badges.genua.fr/local/readthedocs/?version=latest From e24394a5a800479adccacfa52eaff82c8f1d28a1 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 30 Apr 2025 18:42:52 +0200 Subject: [PATCH 2/5] Fix Django version requirement in setup.py. Fix #94 --- CHANGELOG.rst | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2975003..9940e45 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,15 @@ All notable changes to this project will be documented in this file. .. contents:: Table of Contents :depth: 2 +Unreleased +========== + +Fix +--- + +* Django version requirement in setup.py + + v3.0.0 - 2025-04-21 =================== diff --git a/setup.py b/setup.py index 463c80c..8232391 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ }, keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'], install_requires=[ - 'Django >= 1.11,<4.3', 'requests >= 2.4', 'requests_futures >= 0.9.5', + 'Django >= 1.11,<5.3', 'requests >= 2.4', 'requests_futures >= 0.9.5', 'lxml >= 3.4' ], url="https://github.com/nitmir/django-cas-server", From 473c868fbe8811f0bb0575c5dfb5abc67b19227e Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Thu, 1 May 2025 11:50:26 +0200 Subject: [PATCH 3/5] Update URL in doc and default settings --- CHANGELOG.rst | 5 +++++ README.rst | 24 ++++++++++++------------ cas_server/cas.py | 2 +- cas_server/default_settings.py | 14 +++++++------- cas_server/utils.py | 2 +- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9940e45..0fd3da3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,11 @@ Fix * Django version requirement in setup.py +Changed +------- + +* Update URL in doc and default settings (css and js CDN urls) + v3.0.0 - 2025-04-21 =================== diff --git a/README.rst b/README.rst index 48ce256..5fb72a6 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ CAS Server |gh_action| |coverage| |licence| |github_version| |pypi_version| |doc| CAS Server is a Django application implementing the `CAS Protocol 3.0 Specification -`_. +`_. By default, the authentication process uses django internal users but you can easily use any source (see the `Authentication backend`_ section and auth classes in the auth.py file) @@ -89,7 +89,7 @@ The recommended installation mode is to use a virtualenv with ``--system-site-pa $ virtualenv -p python3 --system-site-packages cas_venv -4. And `activate it `__:: +4. And `activate it `__:: $ cd cas_venv/; . bin/activate @@ -110,7 +110,7 @@ The recommended installation mode is to use a virtualenv with ``--system-site-pa Then, either run ``make install`` to create a python package using the sources of the repository and install it with pip, or place the ``cas_server`` directory into your - `PYTHONPATH `_ + `PYTHONPATH `_ (for instance by symlinking ``cas_server`` to the root of your django project). 7. Open ``cas_project/settings.py`` in your favourite editor and follow the quick start section. @@ -198,13 +198,13 @@ Template settings The default is:: { - "bootstrap3_css": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", - "bootstrap3_js": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js", - "html5shiv": "//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js", - "respond": "//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js", - "bootstrap4_css": "//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", - "bootstrap4_js": "//stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js", - "jquery": "//code.jquery.com/jquery.min.js", + "bootstrap3_css": "https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css", + "bootstrap3_js": "https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js", + "html5shiv": "https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js", + "respond": "https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js", + "bootstrap4_css": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css", + "bootstrap4_js": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js", + "jquery": "https://code.jquery.com/jquery.min.js", } if you omit some keys of the dictionary, the default value for these keys is used. @@ -387,7 +387,7 @@ Only useful if you are using the mysql authentication backend: * ``"crypt"`` (see ), the password in the database should begin with $. This method is deprecated and will stop to work in python 3.13. - * ``"ldap"`` (see https://tools.ietf.org/id/draft-stroeder-hashed-userpassword-values-01.html) + * ``"ldap"`` (see https://datatracker.ietf.org/doc/html/draft-stroeder-hashed-userpassword-values) the password in the database must begin with one of {MD5}, {SMD5}, {SHA}, {SSHA}, {SHA256}, {SSHA256}, {SHA384}, {SSHA384}, {SHA512}, {SSHA512}, {CRYPT}. {CRYPT} is deprecated and will stop to work in python 3.13. @@ -691,4 +691,4 @@ You could for example do as below:: :target: https://badges.genua.fr/coverage/django-cas-server/master .. |doc| image:: https://badges.genua.fr/local/readthedocs/?version=latest - :target: http://django-cas-server.readthedocs.io + :target: https://django-cas-server.readthedocs.io diff --git a/cas_server/cas.py b/cas_server/cas.py index de4727e..6bab3b3 100644 --- a/cas_server/cas.py +++ b/cas_server/cas.py @@ -369,7 +369,7 @@ def fetch_saml_validation(self, ticket): @classmethod def get_saml_assertion(cls, ticket): """ - http://www.jasig.org/cas/protocol#samlvalidate-cas-3.0 + https://apereo.github.io/cas/7.0.x/protocol/CAS-Protocol-Specification.html#42-samlvalidate-cas-30 SAML request values: diff --git a/cas_server/default_settings.py b/cas_server/default_settings.py index cd66a86..e051cdc 100644 --- a/cas_server/default_settings.py +++ b/cas_server/default_settings.py @@ -40,13 +40,13 @@ CAS_SHOW_POWERED = True #: URLs to css and javascript external components. CAS_COMPONENT_URLS = { - "bootstrap3_css": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", - "bootstrap3_js": "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js", - "html5shiv": "//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js", - "respond": "//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js", - "bootstrap4_css": "//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", - "bootstrap4_js": "//stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js", - "jquery": "//code.jquery.com/jquery.min.js", + "bootstrap3_css": "https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css", + "bootstrap3_js": "https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js", + "html5shiv": "https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js", + "respond": "https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js", + "bootstrap4_css": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css", + "bootstrap4_js": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js", + "jquery": "https://code.jquery.com/jquery.min.js", } #: Path to the template showed on /login then the user is not autenticated. CAS_LOGIN_TEMPLATE = 'cas_server/bs4/login.html' diff --git a/cas_server/utils.py b/cas_server/utils.py index ec80a5d..ee7ce01 100644 --- a/cas_server/utils.py +++ b/cas_server/utils.py @@ -437,7 +437,7 @@ def crypt_salt_is_valid(salt): class LdapHashUserPassword(object): """ Class to deal with hashed password as defined at - https://tools.ietf.org/id/draft-stroeder-hashed-userpassword-values-01.html + https://datatracker.ietf.org/doc/html/draft-stroeder-hashed-userpassword-values """ #: valide schemes that require a salt From f01e8381a0d80e6766a6b3b666c5c5ff39f2a346 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 18 May 2025 11:31:15 +0200 Subject: [PATCH 4/5] Add python 3.12 and 3.13 classifier to setup.py --- CHANGELOG.rst | 1 + setup.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0fd3da3..cea2453 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ Fix --- * Django version requirement in setup.py +* Add python 3.12 and 3.13 classifier to setup.py Changed ------- diff --git a/setup.py b/setup.py index 8232391..e06de72 100644 --- a/setup.py +++ b/setup.py @@ -48,6 +48,8 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', From 3928cbabc3651793de11d940ea2158149b46747e Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 18 May 2025 11:31:48 +0200 Subject: [PATCH 5/5] Update to version 3.1.0 v3.1.0 - 2025-05-18 =================== Fix --- * Django version requirement in setup.py * Add python 3.12 and 3.13 classifier to setup.py Changed ------- * Update URL in doc and default settings (css and js CDN urls) --- CHANGELOG.rst | 4 ++-- cas_server/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cea2453..47d5582 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,8 +6,8 @@ All notable changes to this project will be documented in this file. .. contents:: Table of Contents :depth: 2 -Unreleased -========== +v3.1.0 - 2025-05-18 +=================== Fix --- diff --git a/cas_server/__init__.py b/cas_server/__init__.py index 3c28abb..19e2456 100644 --- a/cas_server/__init__.py +++ b/cas_server/__init__.py @@ -15,7 +15,7 @@ django = None #: version of the application -VERSION = '3.0.0' +VERSION = '3.1.0' if django is None or django.VERSION < (3, 2): #: path the the application configuration class