api: Add skip_angle_check to qr-verify
This commit is contained in:
parent
6b0afd286e
commit
ef97ed79d4
@ -689,6 +689,7 @@ class QrVerifyView(BaseView):
|
||||
sd.location = ip_to_region(sd.ip)
|
||||
|
||||
qrcode = request.data.get("qrcode")
|
||||
skip_angle_check = request.data.get("skip_angle_check")
|
||||
# Allow the client to override the threshold. It's not a security
|
||||
# problem because this API is advisory and doesn't authenticate or
|
||||
# authorize the client or the product for anything else except to
|
||||
@ -712,7 +713,8 @@ class QrVerifyView(BaseView):
|
||||
tenant = product.tenant
|
||||
sd.tenant = tenant
|
||||
sd.batch = sc.batch
|
||||
self.dot_angle_check(sc.batch, tf.name, messages, request.data.get("angle"))
|
||||
if not skip_angle_check:
|
||||
self.dot_angle_check(sc.batch, tf.name, messages, request.data.get("angle"))
|
||||
if sc.batch.feature_comparison_threshold > 0.01:
|
||||
self.do_v5_qr_verify(tf.name, messages)
|
||||
sd.succeeded = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user