Skip to content
Snippets Groups Projects
Commit a82dc686 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Fix: Use correct encoding for the organization given by the environment...

Fix: Use correct encoding for the organization given by the environment variable. (Redmine issue: #7553)
parent 4c89be6b
No related branches found
No related tags found
No related merge requests found
......@@ -214,12 +214,12 @@ class RegisterView(HTMLMixin, SQLAlchemyMixin, BaseRegisterView):
# Try to fetch organization from server authentication headers (optional).
while True:
try:
item.organization = flask.request.environ['perunOrganizationName']
item.organization = flask.request.environ['perunOrganizationName'].encode("iso-8859-1").decode()
break
except (KeyError, AttributeError):
pass
try:
item.organization = flask.request.environ['o']
item.organization = flask.request.environ['o'].encode("iso-8859-1").decode()
break
except (KeyError, AttributeError):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment