Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mentat-admin3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
mentat-admin3
Commits
4c89be6b
Commit
4c89be6b
authored
2 years ago
by
Rajmund Hruška
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Use correct encoding for the name given by the environment variable. (Redmine issue:
#7553
)
parent
6c93fd19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/hawat/blueprints/auth_env/__init__.py
+4
-4
4 additions, 4 deletions
lib/hawat/blueprints/auth_env/__init__.py
with
4 additions
and
4 deletions
lib/hawat/blueprints/auth_env/__init__.py
+
4
−
4
View file @
4c89be6b
...
@@ -13,7 +13,7 @@ This pluggable module provides default authentication service based on server
...
@@ -13,7 +13,7 @@ This pluggable module provides default authentication service based on server
environment. In this case the burden of performing actual authentication is
environment. In this case the burden of performing actual authentication is
on the web server used for serving the web interface. The authentication module
on the web server used for serving the web interface. The authentication module
then simply uses selected environment variables set up by the server after
then simply uses selected environment variables set up by the server after
successful
l
authentication.
successful authentication.
This module also provides interface for automated user account registration. The
This module also provides interface for automated user account registration. The
registration form is pre-filled with data gathered again from server environment.
registration form is pre-filled with data gathered again from server environment.
...
@@ -183,14 +183,14 @@ class RegisterView(HTMLMixin, SQLAlchemyMixin, BaseRegisterView):
...
@@ -183,14 +183,14 @@ class RegisterView(HTMLMixin, SQLAlchemyMixin, BaseRegisterView):
# Try to fetch name from server authentication headers (optional).
# Try to fetch name from server authentication headers (optional).
while
True
:
while
True
:
try
:
try
:
item
.
fullname
=
flask
.
request
.
environ
[
'
cn
'
]
item
.
fullname
=
flask
.
request
.
environ
[
'
cn
'
]
.
encode
(
"
iso-8859-1
"
).
decode
()
break
break
except
(
KeyError
,
AttributeError
):
except
(
KeyError
,
AttributeError
):
pass
pass
try
:
try
:
item
.
fullname
=
'
{} {}
'
.
format
(
item
.
fullname
=
'
{} {}
'
.
format
(
flask
.
request
.
environ
[
'
givenName
'
],
flask
.
request
.
environ
[
'
givenName
'
]
.
encode
(
"
iso-8859-1
"
).
decode
()
,
flask
.
request
.
environ
[
'
sn
'
]
flask
.
request
.
environ
[
'
sn
'
]
.
encode
(
"
iso-8859-1
"
).
decode
()
)
)
break
break
except
(
KeyError
,
AttributeError
):
except
(
KeyError
,
AttributeError
):
...
...
This diff is collapsed.
Click to expand it.
Rajmund Hruška
@rajmund_hruska
mentioned in issue
#7553 (closed)
·
2 months ago
Imported
mentioned in issue
#7553 (closed)
mentioned in issue #7553
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment