-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,21 +61,15 @@ def login(): | |
else: | ||
return redirect(url_for(PAGE_INDEX)) | ||
|
||
# log_info(f"request.url: {request.url}") | ||
# if request.method == 'GET': | ||
# log_info(f"GET: request.args: {request.args.to_dict()}") | ||
# else: | ||
# log_info(f"POST: request.form: {request.form.to_dict()}") | ||
|
||
# Process POST | ||
form = LoginForm() | ||
if form.validate_on_submit(): | ||
username = form.username.data | ||
if not is_whitelisted_username(username): | ||
flash(f'Username {username} is not authorized to log in to this server. Please contact ' | ||
'[email protected] if you believe you need access to this server.', 'error') | ||
log_error(f'Non-whitelisted login attempt by {username}') | ||
return redirect(url_for(PAGE_LOGIN)) | ||
# domain = form.domain.data # Never None | ||
domain = "edi" | ||
user_dn = 'uid=' + form.username.data + ',' + Config.DOMAINS[domain] | ||
password = form.password.data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters