Skip to content

Cannot authenticate with usermnames containing 'ä','ö','ü' #110

Open

Description

@queso1307

I am trying to connect to a Windows2012r2 Server running IIS8 from my Ubuntu 16.04 machine.
My username contains a 'ä'.
When calling:

session.auth = HttpNtlmAuth("domain\\*ä****","*****")
session.get("https://Server2012.domain/RDWeb/FeedLogin/WebFeedLogin.aspx", verify=False)

i get this Error:
Traceback (most recent call last): File "/work/test/ntlmtest.py", line 7, in <module> session.get("https://win2012r2-1.dev.test/RDWeb/FeedLogin/WebFeedLogin.aspx", verify=False) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests/sessions.py", line 521, in get return self.request('GET', url, **kwargs) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests/sessions.py", line 625, in send r = dispatch_hook('response', hooks, r, **kwargs) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests/hooks.py", line 31, in dispatch_hook _hook_data = hook(hook_data, **kwargs) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests_ntlm/requests_ntlm.py", line 151, in response_hook kwargs File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/requests_ntlm/requests_ntlm.py", line 121, in retry_using_http_NTLM_auth server_certificate_hash=server_certificate_hash File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/ntlm_auth/ntlm.py", line 216, in create_authenticate_message msg = self._context.step(self._challenge_token) File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/ntlm_auth/ntlm.py", line 86, in step cbt_data=self.cbt_data File "/home/IGEL/arlt/.local/lib/python3.5/site-packages/ntlm_auth/messages.py", line 338, in __init__ self.user_name = user_name.encode(encoding_value) UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 1: ordinal not in range(128)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions