Commit graph

65 commits

Author SHA1 Message Date
Valentin Samir
a82d348b20 Fix unicode sandwich issue in cas_server.utils.update_url. Fix #82 2022-10-16 20:55:21 +02:00
Yohann D'ANELLO
10b389e7be
With Python 3.9, the crypt function raises an OSError
See https://bugs.python.org/issue39289

Signed-off-by: Yohann D'ANELLO <ynerant@¢rans.org>
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2020-12-22 23:07:33 +01:00
Théophile Bastian
b7c7c0f0ba Service URL: keep blank GET arguments
When a service URL contains GET arguments with no associated value, eg
  http://example.com/?foo=a&bar
only the arguments with value are kept, yielding
  http://example.com/?foo=a&ticket=<TICKET>
losing `bar` in the process
2020-07-05 14:52:01 +02:00
Yohann D'ANELLO
4129687e41 Support Django 2.2 and 3.0 2020-07-05 14:52:01 +02:00
Théophile Bastian
f4b4428b94 Fix CRYPT-DES hash method for LDAP
The LDAP-formatted passwords using
[Crypt encoding](https://en.wikipedia.org/wiki/Crypt_(C))
can be hashed in many ways, inlcuding the old and deprecated DES and
BSDi methods.

The usual formatting for Crypt method consists in
  $method$salt$pass_hash
but those two deprecated methods are not encoded this way, and
`get_salt` would fail on those, yielding Error 500.
2020-07-05 14:52:01 +02:00
Valentin Samir
4123450e9f Add support for Django 2.0, fix #33 2018-01-27 10:44:34 +01:00
Valentin Samir
37c975eaf7 Allow both unicode and bytes dotted string in utils.import_attr 2016-09-18 11:21:33 +02:00
Valentin Samir
868a06ea3f Really pick the last version on Pypi for new version checking.
We were only sorting version string lexicographically and it would have break when
we reach version 0.10.N or 0.N.10
2016-09-06 12:02:43 +02:00
Valentin Samir
6b007f3960 Add CAS_INFO_MESSAGES tests 2016-08-24 18:20:12 +02:00
Valentin Samir
e8d893beeb Add a CAS_INFO_MESSAGES and CAS_INFO_MESSAGES_ORDER settings allowing to display messages 2016-08-24 18:01:45 +02:00
Valentin Samir
14a459b128 Add a validator to models CharField that should be regular expressions 2016-08-21 09:07:43 +02:00
Valentin Samir
d46428520f Code factorisation in models.py 2016-08-05 17:56:34 +02:00
Valentin Samir
d053003344 Add test for ldap check password with bad base64 hash 2016-08-01 18:33:58 +02:00
Valentin Samir
2298b94f78 Add SqlAuthUser and LdapAuthUser auth classes. Deprecate the usage of SqlAuthUser in favor of SqlAuthUser.
SqlAuthUser use django databases management, and thus is compatible with all SQL databases supported
by django: postgresql, mysql, sqlite3 and oracle.

LdapAuthUser use the full pythonic ldap3 module
2016-07-31 17:09:27 +02:00
Valentin Samir
4721eb4f81 Catch base64 decode error on b64decode to raise our custom exception BadHash 2016-07-31 12:27:14 +02:00
Valentin Samir
570676f5b0 fix some codacy errors 2016-07-29 15:18:10 +02:00
Valentin Samir
3063cf116b few flake8 and python3 problems corrected 2016-07-29 14:55:52 +02:00
Valentin Samir
b6cffcf482 Add new version email and info box then new version is available 2016-07-29 14:33:39 +02:00
Valentin Samir
3ff4bb16a9 Drop dependancies django-picklefield and django-bootstrap3 2016-07-24 10:51:29 +02:00
Valentin Samir
cec0cadb7a Add some docs using sphinx autodoc 2016-07-20 18:29:00 +02:00
Valentin Samir
8e5b75e090 Add some docstrings 2016-07-03 17:54:11 +02:00
Valentin Samir
63f5b2cabf Merge branch 'master' into federate 2016-07-01 16:44:22 +02:00
Valentin Samir
95511943e8 Add a utils function to test crypt salts 2016-07-01 01:21:57 +02:00
Valentin Samir
a5ed74ee56 SOme python3 compatibility 2016-07-01 00:09:51 +02:00
Valentin Samir
219171fe41 Set legals headers 2016-07-01 00:02:46 +02:00
Valentin Samir
7cbbab444f Full utils coverage 2016-07-01 00:00:33 +02:00
Valentin Samir
c7c5151acf Tests comments and move http server handlers from cas_server.utils to cas_server.tests.utils 2016-06-30 23:13:53 +02:00
Valentin Samir
d4b9d66051 Cleaner BaseHTTPRequestHandler 2016-06-29 20:51:30 +02:00
Valentin Samir
6972ad7536 Add some docstrings and comments 2016-06-29 00:25:09 +02:00
Valentin Samir
44acd005ee Full coverage for view validateService 2016-06-28 18:58:39 +02:00
Valentin Samir
434dcf6e4e Correct some codacy errors 2016-06-28 00:48:48 +02:00
Valentin Samir
dedc1e34a2 Fix some style error introduced during the merge 2016-06-28 00:37:18 +02:00
Valentin Samir
32b5627c38 Merge branch 'dev' into federate 2016-06-28 00:34:31 +02:00
Valentin Samir
93c2dae96b Add docstrings 2016-06-26 22:07:38 +02:00
Valentin Samir
2fac47f0b1 Add unit test for the utils function check_password 2016-06-26 21:44:41 +02:00
Valentin Samir
ac206d56d6 Add some password check methods to the MySQL auth backend 2016-06-26 20:29:47 +02:00
Valentin Samir
164e2f5c28 style 2016-06-26 16:02:25 +02:00
Valentin Samir
ac5f359063 style 2016-06-26 11:26:19 +02:00
Valentin Samir
4bb886f083 python3 compatibility 2016-06-24 23:37:24 +02:00
Valentin Samir
0776e371e8 style 2016-06-24 21:23:33 +02:00
Valentin Samir
12201665de Add some dango unit tests 2016-06-24 21:07:19 +02:00
Valentin Samir
6d7300fe43 Add SLO support from federated CAS 2016-06-23 17:18:53 +02:00
Valentin Samir
a00e5d403d Add a verbone names to CAS_FEDERATE_PROVIDERS 2016-06-21 14:46:01 +02:00
Valentin Samir
a209b06df0 Merge branch 'master' into federate 2016-06-20 13:36:30 +02:00
Valentin Samir
c7ac3bee7a Add a h1 to default templates and a logo 2016-06-20 13:31:59 +02:00
Valentin Samir
efdd97ec07 Test for CAS federation 2016-06-17 19:28:49 +02:00
Valentin Samir
a45cb1d38b Typo, bad variable name 2016-05-11 13:06:41 +02:00
Valentin Samir
93e11befc5 [utils.py] Errors in utils.import_attr are more understandable. 2016-03-18 13:03:23 +01:00
Valentin Samir
b69769d71a Django 1.9 compatibility 2015-12-12 13:53:21 +01:00
Valentin Samir
9df1cd2e31 Add javascript login function allow service A to log user to service B via javascript
CORS need to be correctly configured if not this can lead to security issues.
Please do not put Access-Control-Allow-Origin: "*".
You can use django-cors-headers to properly configure CORS
2015-11-17 14:50:16 +01:00