We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 228fd3e commit 32527e1Copy full SHA for 32527e1
sogs/routes/auth.py
@@ -1,6 +1,6 @@
1
from ..web import app
2
from ..db import query
3
-from .. import crypto, http, utils
+from .. import config, crypto, http, utils
4
from ..model.user import User
5
from ..hashing import blake2b
6
@@ -247,8 +247,11 @@ def handle_http_auth():
247
pk = VerifyKey(pk)
248
if blinded_pk:
249
session_id = '15' + pk.encode().hex()
250
+ elif config.REQUIRE_BLIND_KEYS:
251
+ abort_with_reason(
252
+ http.BAD_REQUEST, "Invalid authentication: this server requires the use of blinded ids"
253
+ )
254
else:
- # TODO: if "blinding required" config option is set then reject the request here
255
try:
256
session_id = '05' + pk.to_curve25519_public_key().encode().hex()
257
except nacl.exceptions.RuntimeError:
0 commit comments