Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def verify(self, value):
captcha = self.session.get("captcha", None)
if captcha: del self.session["captcha"]
if not captcha: raise appier.base.SecurityError(
message = "No captcha available",
error_code = 401
)
if not value == captcha: raise appier.base.SecurityError(
message = "Invalid captcha value",
error_code = 401
)