mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1013976 (Content Server with iPad problems)
This commit is contained in:
parent
d602d43247
commit
8d42bfb222
@ -102,7 +102,12 @@ class AuthController(object):
|
|||||||
@wraps(func)
|
@wraps(func)
|
||||||
def authenticate(*args, **kwargs):
|
def authenticate(*args, **kwargs):
|
||||||
cookie = cherrypy.request.cookie.get(self.cookie_name, None)
|
cookie = cherrypy.request.cookie.get(self.cookie_name, None)
|
||||||
if not (allow_cookie_auth and self.is_valid(cookie)):
|
ua = cherrypy.request.headers.get('User-Agent', '').strip()
|
||||||
|
|
||||||
|
if ('iPad;' in ua or 'iPhone;' in ua or (
|
||||||
|
not (allow_cookie_auth and self.is_valid(cookie)))):
|
||||||
|
# Apparently the iPad cant handle this
|
||||||
|
# see https://bugs.launchpad.net/bugs/1013976
|
||||||
digest_auth(self.realm, get_ha1_dict_plain(self.users_dict),
|
digest_auth(self.realm, get_ha1_dict_plain(self.users_dict),
|
||||||
self.secret)
|
self.secret)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user