mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 10:43:52 +02:00
...
This commit is contained in:
parent
c3b3e3a7ae
commit
edd4ecd74f
2 changed files with 4 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ def validate_request(self, pw, data, log=None):
|
|||
log.warn('Authorization URI mismatch: %s != %s from client: %s' % (
|
||||
data.path, path, data.remote_addr))
|
||||
raise HTTPSimpleResponse(httplib.BAD_REQUEST, 'The uri in the Request Line and the Authorization header do not match')
|
||||
return self.response is not None and path == data.path and self.request_digest(pw, data) == self.response
|
||||
return self.response is not None and data.path == path and self.request_digest(pw, data) == self.response
|
||||
# }}}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,9 @@ def conn(self):
|
|||
uv = next(c.execute('PRAGMA user_version'))[0]
|
||||
if uv == 0:
|
||||
# We have to store the unhashed password, since the digest
|
||||
# auth scheme requires it.
|
||||
# auth scheme requires it. (Technically, one can store
|
||||
# a MD5 hash of the username+realm+password, but it has to be
|
||||
# without salt so it is trivially brute-forceable, anyway)
|
||||
# timestamp stores the ISO 8601 creation timestamp in UTC.
|
||||
c.execute('''
|
||||
CREATE TABLE users (
|
||||
|
|
|
|||
Loading…
Reference in a new issue