Skip to content
Snippets Groups Projects

fix bytes identifier

Merged Alexa Valentová requested to merge ip-hash-fix into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -36,7 +36,7 @@ def get_ip_hash() -> str:
@@ -36,7 +36,7 @@ def get_ip_hash() -> str:
return base64.b64encode(
return base64.b64encode(
argon2.low_level.hash_secret_raw(
argon2.low_level.hash_secret_raw(
# Support reverse proxy
# Support reverse proxy
flask.request.headers.get("X-Forwarded-For", flask.request.remote_addr),
flask.request.headers.get("X-Forwarded-For", flask.request.remote_addr).encode("utf-8"),
salt=flask.current_app.config["IDENTIFIER_HASH_PEPPER"].encode("utf-8"),
salt=flask.current_app.config["IDENTIFIER_HASH_PEPPER"].encode("utf-8"),
time_cost=flask.current_app.config["IDENTIFIER_HASH_TIME_COST"],
time_cost=flask.current_app.config["IDENTIFIER_HASH_TIME_COST"],
Loading