Fix: ALTCHA secret key missing error.

This commit is contained in:
2025-03-15 18:41:14 +00:00
parent 1a7b72022d
commit 4add7e626e
2 changed files with 3 additions and 3 deletions

View File

@@ -86,11 +86,11 @@ def contact_post():
@routes_core.route(Model_View_Contact.HASH_ALTCHA_CREATE_CHALLENGE, methods=['GET'])
def create_altcha_challenge():
Helper_App.console_log(f'secret key: {current_app.app_config["ALTCHA_SECRET_KEY"]}')
Helper_App.console_log(f'secret key: {current_app.app_config.ALTCHA_SECRET_KEY}')
options = ChallengeOptions(
expires = datetime.datetime.now() + datetime.timedelta(hours=1),
max_number = 100000, # The maximum random number
hmac_key = current_app.app_config["ALTCHA_SECRET_KEY"],
hmac_key = current_app.app_config.ALTCHA_SECRET_KEY,
)
challenge = create_challenge(options)
print("Challenge created:", challenge)