Merge pull request #28 from oddstr13/pr-password-nohash-1

Always use plaintext login
This commit is contained in:
Odd Stråbø 2019-05-14 16:08:00 +02:00 committed by GitHub
commit be70d15cbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -120,7 +120,7 @@ class LoginManual(xbmcgui.WindowXMLDialog):
mode = self.connect_manager['server-mode']
server = self.connect_manager['server-address']
result = self.connect_manager['login'](server, username, password, False if mode == 1 and server.startswith('http://') else True)
result = self.connect_manager['login'](server, username, password)
if not result:
self._error(ERROR['Invalid'], _('invalid_auth'))

View file

@ -157,12 +157,10 @@ class ConnectionManager(object):
'type': "POST",
'url': self.get_jellyfin_url(server, "Users/AuthenticateByName"),
'json': {
'username': username,
'password': hashlib.sha1(password or "").hexdigest(),
'Username': username,
'Pw': password or ""
}
}
if clear:
request['json']['pw'] = password or ""
result = self._request_url(request, False)
except Exception as error: # Failed to login