mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Server: Fix failed login attempts using digest auth not being logged to the main log
This commit is contained in:
parent
5b6482c3c9
commit
f838e6c3a4
@ -238,7 +238,6 @@ class AuthController(object):
|
|||||||
if not nonce_is_stale:
|
if not nonce_is_stale:
|
||||||
data.username = da.username
|
data.username = da.username
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
log_msg = 'Failed login attempt from: %s' % data.remote_addr
|
log_msg = 'Failed login attempt from: %s' % data.remote_addr
|
||||||
elif self.prefer_basic_auth and scheme == 'basic':
|
elif self.prefer_basic_auth and scheme == 'basic':
|
||||||
try:
|
try:
|
||||||
@ -250,7 +249,6 @@ class AuthController(object):
|
|||||||
if self.check(un, pw):
|
if self.check(un, pw):
|
||||||
data.username = un
|
data.username = un
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
log_msg = 'Failed login attempt from: %s' % data.remote_addr
|
log_msg = 'Failed login attempt from: %s' % data.remote_addr
|
||||||
else:
|
else:
|
||||||
raise HTTPSimpleResponse(httplib.BAD_REQUEST, 'Unsupported authentication method')
|
raise HTTPSimpleResponse(httplib.BAD_REQUEST, 'Unsupported authentication method')
|
||||||
|
@ -551,7 +551,7 @@ class HTTPConnection(HTTPRequest):
|
|||||||
return
|
return
|
||||||
if isinstance(output, ReadableOutput):
|
if isinstance(output, ReadableOutput):
|
||||||
self.use_sendfile = output.use_sendfile and self.opts.use_sendfile and sendfile_to_socket_async is not None and self.ssl_context is None
|
self.use_sendfile = output.use_sendfile and self.opts.use_sendfile and sendfile_to_socket_async is not None and self.ssl_context is None
|
||||||
# sendfile() does nto work with SSL sockets since encryption has to
|
# sendfile() does not work with SSL sockets since encryption has to
|
||||||
# be done in userspace
|
# be done in userspace
|
||||||
if output.ranges is not None:
|
if output.ranges is not None:
|
||||||
if isinstance(output.ranges, Range):
|
if isinstance(output.ranges, Range):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user