1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-06-01 00:28:05 +02:00
Commit Graph

705 Commits

Author SHA1 Message Date
Boris Rybalkin
e2ab3e85d8 lcCopy 2020-01-10 22:10:28 +00:00
Carpentier Pierre-Francois
b5907ce340
Merge pull request #55 from StbX/master
add missing import
2019-10-23 21:09:28 +02:00
Steffen Brandemann
791895d4c3 add missing os import 2019-10-21 23:17:20 +02:00
Carpentier Pierre-Francois
856157af79
Merge pull request #24 from jqueuniet/fix_default_handler
Fix default handler arguments
2019-05-03 12:09:13 +02:00
Carpentier Pierre-Francois
b5e7cb6a44
Merge pull request #33 from smacz42/install-in-readme
Add install command to setup in README
2019-04-23 19:56:51 +02:00
smacz
d61c89460e Add install command to setup in README 2019-04-23 11:24:17 -04:00
Johann Queuniet
0a96ca61d5
Fix default handler arguments 2019-03-26 11:05:39 +01:00
Carpentier Pierre-Francois
3b58f1464e
Merge pull request #23 from jqueuniet/fix_email_regexp
Change the email regular expression to fix a few validation issues
2019-03-20 18:33:19 +01:00
Johann Queuniet
50c6259035
Fix email regexp 2019-03-20 15:57:45 +01:00
kakwa
245bafb01c typo 2019-02-13 09:44:47 +01:00
kakwa
5ee8a74040 update documentation 2019-02-13 09:41:17 +01:00
kakwa
96acda7aa6 fix formatting 2019-02-13 09:19:08 +01:00
kakwa
30c28c5feb slightly more robust unit tests
pre-cleanup to avoid contamination if other tests fail
2019-02-12 23:28:52 +01:00
kakwa
dc60300a29 version + changelog 2019-02-12 23:28:41 +01:00
kakwa
882a303474 fix crash due to encoding in python 2 2019-02-12 23:27:30 +01:00
kakwa
d831b09293 improve documentation
* improve documentation for key: True flag in attributes.yml
* improve documentation for the ldap filters and their templating
* improve comment in the .ini file
2019-02-12 23:06:42 +01:00
kakwa
7ac7118c9a adding a debug log to help figure out issues with filters. 2019-02-12 22:43:03 +01:00
kakwa
d690bbdc41 passing the correct logger to the backend
previously, the default logger was passed, this logger was using the
default configuration and log level, not honoring log level in
particular.
As a consequence, it was impossible to get debug logs from the backend.
This is now working as expected.
2019-02-12 22:40:42 +01:00
kakwa
73c02ccff4 disable default logger if running in debug mode (-D)
Debug mode can lead to log sensitive data (like password changes).
Having -D to log exclusively to stderr is a safer option.
2019-02-12 22:36:16 +01:00
kakwa
799ca2403f fix the urls for modify and delete
The id of the user is passed through the querystring in this page.
But the id was not properly escaped to be included as a querystring
parameter leading to weird issues like.
2019-02-12 21:24:24 +01:00
kakwa
bbafafae60 remove the double escaping.
Now the escaping is done by in the templates.
We need to remove the previous escaping done by hand in the code.
Otherwise, we end-up with double escaping and funky displaying of
fields.
2019-02-12 21:18:45 +01:00
kakwa
0cf5483785 add warning in documentation for log level 'debug' 2019-02-10 18:19:55 +01:00
kakwa
df2746b996 version bump + changelog 2019-02-10 18:15:07 +01:00
kakwa
e6bcf9d97d adding the possibility to log to stdout 2019-02-10 18:12:45 +01:00
kakwa
57bcaaed66 changelog and version bump 2019-02-09 20:49:23 +01:00
kakwa
b68214022c fix error handling when adding user that already exists 2019-02-09 20:47:34 +01:00
kakwa
932e7a8b40 adding (mostly) working configuration example 2019-02-09 20:24:32 +01:00
kakwa
abf1454278 changelog+version bump 2019-02-09 20:21:29 +01:00
kakwa
0793361d90 switch to "stable" in setup.py troves 2019-02-09 20:19:57 +01:00
kakwa
f824790849 another exception 2019-02-09 19:42:48 +01:00
kakwa
7390c931b9 another exception 2019-02-09 19:37:52 +01:00
kakwa
4a8aa1c655 another exception 2019-02-09 19:32:50 +01:00
kakwa
e50df5dde3 wider exception for <input> attribute "type" has invalid value 2019-02-09 19:26:31 +01:00
kakwa
fba2d32b44 another exception for todylib 2019-02-09 19:21:41 +01:00
kakwa
7a8468f8b1 adding another ignore 2019-02-09 19:15:31 +01:00
kakwa
9d0d321e9b another ignore for tidylib 2019-02-09 19:09:32 +01:00
kakwa
c5536bdc56 adding a fffew other exception in tidylib 2019-02-09 19:04:40 +01:00
kakwa
abfce4803a fix typo 2019-02-09 18:57:50 +01:00
kakwa
046afbbe29 html_tidy cleanup 2019-02-09 18:54:35 +01:00
kakwa
98fca30fba ignoring another nav error 2019-02-09 18:44:51 +01:00
kakwa
f13961790f adding exception for <nav> tags in html validation 2019-02-09 18:40:48 +01:00
kakwa
a56c491ee1 cleanup in html template + tidylib
* few small cleanup in html template (avoid empty tbody, put id between
quotes)
* switch to tidylib to validate the html instead of the previous hack
calling an external service (https://html5.validator.nu/)
* remove the previous validator script
* add exception for tidylib on empty <span> (these are required by
bootstrap)
2019-02-09 18:31:37 +01:00
kakwa
02357d886a remove debug print 2019-02-09 18:18:58 +01:00
kakwa
263e6be547 fix html validator test for python 3 2019-02-09 17:40:43 +01:00
kakwa
05aace0e9d force the groups in flatten roles to be sorted
* sorting the groups helps debuggability and also permits testing
that doesn't rely on python ordering (which is different between 2 and
3).
2019-02-09 17:36:01 +01:00
kakwa
baa3430e63 fix test and exception handling in code
With python 2 it was possible to do exception[0][...] to recover
details about an exception.
It's no longer authorized with python 3.
Now, we must do something like exception.args or exception.urls.
fortunately this syntax also works with python 2.
So we use it for both.
2019-02-09 17:12:39 +01:00
kakwa
90ff69586b remove deprecation warning for html escape
in python 2, (html) escape is part of the cgi module
in python 3, it's part of the html module

we now do a conditional import depending on the version, and name the
function html_escape.
2019-02-09 16:29:16 +01:00
kakwa
79983c078f fix behavior of get_attributes()
* make sure it returns an ordered list in both python 2 and python 3
2019-02-09 16:22:42 +01:00
kakwa
10747cff93 add some python 3 support in the LDAP and AD backends
python-ldap talks in bytes,
as the rest of ldapcherry talks in unicode utf-8:
* everything passed to python-ldap must be converted to bytes
* everything coming from python-ldap must be converted to unicode

The previous statement was true for python-ldap < version 3.X.
With versions > 3.0.0 and python 3, it gets tricky,
some parts of python-ldap takes string, specially the filters/escaper.

so we have now:
*_byte_p2 (unicode -> bytes conversion for python 2)
*_byte_p3 (unicode -> bytes conversion for python 3)
*_byte_p23 (unicode -> bytes conversion for python AND 3)
2019-02-09 16:08:18 +01:00
kakwa
979d4eeda8 disable ppolicy in samba test deployment 2019-02-09 15:42:48 +01:00