Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
queso1307 opened this issue Nov 13, 2018 · 0 comments
Open

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

queso1307 opened this issue Nov 13, 2018 · 0 comments

Comments

@queso1307
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant