|
|
Mads Kiilerich
|
db9718bde286
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
bd1c1fa6524b
|
6 years ago
|
|
auth: simplify handling of Crowd json response (Issue #370)
Correct error where Crowd authentication didn't work due to urllib.readlines() returning bytes and thus failing to be joined with a string.
json.loads is however happy to take bytes directly.
Fix error handling to also handle bytes without crashing.
|
|
|
Mads Kiilerich
|
22b40db44a41
|
6 years ago
|
|
py3: migrate from urllib2 to urllib
Based on 2to3 urllib, but with unnecessary imports removed.
|
|
|
Mads Kiilerich
|
8114623895cc
|
6 years ago
|
|
auth: make crowd logging simpler
There is no point in creating dicts and then logging them as json. Also, json can't handle py3 bytes and it would fail on py3. (ext_json could perhaps handle bytes, but it seems better to keep it simple and explicit.)
If the default repr isn't good enough, it would be better to use pprint. But repr is good enough.
|
|
|
Mads Kiilerich
|
b4095011433d
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
58b6e4cd6fe9
|
6 years ago
|
|
lib: clean up ext_json and how it is used - avoid monkey patching
Note that py3 json.dumps will return ASCII (with all unicode escaped) encoded as str. But we generally want JSON as bytes (which json.loads also can read), so also wrap the result with ascii_bytes in many places.
|
|
|
Mads Kiilerich
|
fe4086096758
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
0a277465fddf
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
c9d859a89a88
|
7 years ago
|
|
auth: move 'active' handling out of the individual auth modules
The 'active' flag in the Kallithea user database is very fundamental and should not be specific to auth modules. Modules should only care about whether the user is active in the external authentication system.
user_activation_state is thus removed, and 'hg.extern_activate.auto' is now consistently checked for all kinds of external authentication.
|
|
|
Mads Kiilerich
|
cb472dfe807d
|
7 years ago
|
|
auth: drop active_from_extern from internal auth API
Modules should never auth a user if the auth source knows the user is inactive. Also, it is too late and unreliable to disable users when they try to log in. There is thus no need for this concept.
Only the crowd module had some traces of actual active_from_extern usage. The 'active' flag for crowd users was fully controlled from crowd. Now, Instead, just let crowd reject authentication of users that are inactive in crowd, and leave the internal Kallithea 'active' flag under admin control.
|
|
|
Chris Rule
|
861ef58bc36e
|
8 years ago
|
|
auth: add https ability to the crowd auth module (issue #315)
[Thomas De Schampheleire: - use select iso checkbox to remove need for bool->string conversion - update tests]
|
|
|
Lars Kruse
|
c1ed9572b965
|
8 years ago
|
|
codingstyle: replace "not ... in ..." with "... not in ..."
Reported by flake8.
|
|
|
Mads Kiilerich
|
26bc2f02d9cd
|
9 years ago
|
|
|
|
|
Robert James Dennington
|
dba6c44f0a30
|
10 years ago
|
|
auth: Fix bug where usernames are not consistently capitalized when using crowd login
If you try to log in to Kallithea via the Crowd auth module then the capitalization of your username in Kallithea changes on every login based on how you capitalized it in the login form.
E.g. Log in with "TestDude", username is entered as "TestDude" then log in again, but this time as "tesTduDe", and your username gets changed to "tesTduDe". etc.
Fix for this is to use the 'name' field returned from Crowd when saving the username. This way the username is always capitalized identically to the record in Crowd.
|
|
|
Robert James Dennington
|
18c9eb22c29c
|
10 years ago
|
|
auth: Fix tomcat throwing '505 HTTP Version Not Supported' when trying to log in to Atlassian Crowd with usernames that contain spaces
If you try to log in to Kallithea via the Crowd auth module, and the username contains a space, it fails. Tomcat on the Crowd server gives error '505 HTTP Version Not Supported'.
Further investigation showed that the username was not being quoted. E.g. for the user 'test account', the REST URL should contain 'test%20account' but actually was containing 'test account'. When Tomcat received this HTTP request it interprets the word 'account' as the HTTP version because of the space. This obviously isn't a valid HTTP version.
This bug is fixed by using urllib2.quote on the username to ensure that special characters are correctly quoted. After making that change on my local install, the user 'test account' was able to log in successfully.
|
|
|
Mads Kiilerich
|
0210d0b769d4
|
10 years ago
|
|
|
|
|
Mads Kiilerich
|
d69aa464f373
|
10 years ago
|
|
cleanup: consistently use 'except ... as ...:'
Use the Python 2.6+ syntax instead of the old confusing 'except ..., ...' syntax.
|
|
|
Mads Kiilerich
|
39bac9410169
|
10 years ago
|
|
|
|
|
Mads Kiilerich
|
c9fcb3b04d4a
|
10 years ago
|
|
|
|
|
Mads Kiilerich
|
03afa7766ac7
|
10 years ago
|
|
|
|
|
Max Roman
|
f3fa50c89783
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
24c0d584ba86
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
1948ede028ef
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
ad38f9f93b3b
|
12 years ago
|
|
Correct licensing information in individual files.
The top-level license file is now LICENSE.md.
Also, in various places where there should have been joint copyright holders listed, a single copyright holder was listed. It does not appear easy to add a link to a large list of copyright holders in these places, so it simply refers to the fact that various authors hold copyright.
In future, if an easy method is discovered to link to a list from those places, we should do so.
Finally, text is added to LICENSE.md to point to where the full list of copyright holders is, and that Kallithea as a whole is GPLv3'd.
|
|
|
Bradley M. Kuhn
|
d1addaf7a91e
|
11 years ago
|
|
Second step in two-part process to rename directories. This is the actual directory rename.
|