Compare commits
No commits in common. "f3b525d715597f81d455f440691095ff73ba3f79" and "2425d99492793dad205369e6db37c5f9355c85f6" have entirely different histories.
f3b525d715
...
2425d99492
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,6 +28,5 @@ instance
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
.scannerwork
|
||||
|
||||
excludes
|
||||
|
@ -24,7 +24,8 @@ from __future__ import annotations
|
||||
import sys
|
||||
import typing as t
|
||||
from functools import wraps
|
||||
from secrets import token_urlsafe, randbits
|
||||
from random import random
|
||||
from secrets import token_urlsafe
|
||||
|
||||
from flask import g, request, Response, session, abort, Flask, Request
|
||||
from itsdangerous import URLSafeTimedSerializer, BadData
|
||||
@ -205,10 +206,9 @@ class DigestAuth:
|
||||
"""
|
||||
opaque: t.Optional[str] = None if not self.use_opaque else \
|
||||
(state.opaque if state.opaque is not None
|
||||
else self.serializer.dumps(randbits(32), salt="opaque"))
|
||||
else self.serializer.dumps(random(), salt="opaque"))
|
||||
nonce: str = self.serializer.dumps(
|
||||
randbits(32),
|
||||
salt="nonce" if opaque is None else f"nonce-{opaque}")
|
||||
random(), salt="nonce" if opaque is None else f"nonce-{opaque}")
|
||||
|
||||
header: str = f"Digest realm=\"{self.realm}\""
|
||||
if len(self.domain) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user