Releases: CheeseCake87/flask-imp
Releases · CheeseCake87/flask-imp
6.4.0
6.3.0
- fix missing
raiseonscope_import is Nonecheck inprocess_folder_file_scope - use context manager for
multiprocessing.Poolinauthenticate_passwordto stop worker leak - fix
disable_default_failsemantics oncheckpoint_callable— default now aborts withfail_status
when no fail handler is set (previously it silently called the protected view) - use
secrets.compare_digestfor bearer token comparison inBearerCheckpoint - mix
secrets.token_hexentropy intogenerate_csrf_tokenoutput ImpBlueprint.import_resourcesnow routes throughcast_to_import_str, fixing import paths for
nested resource folders- preserve order when deduping scoped import results (
dict.fromkeysinstead ofset) - URL-encode username/password when building database URIs to avoid breakage on special characters
- chain
ImportErrorre-raises withfrom eto preserve the original traceback - add testing for checkpoints
6.2.0
🚨 BREAKING CHANGES TO:
- auth.generate_private_key
- auth.authenticate_password
- auth.encrypt_password
The function argument encryption_level has been changed to algorithm and has a new type of Literal
This was done to allow for more algorithms to be added in the future.
6.1.5
- bugfix, return missing from disable default fail on checkpoint
6.1.4
- add disable_default_fail option to checkpoints
6.1.3
- adjust fail_response to accept a callable to avoid out of context error
6.1.2
- fix checkpoint type checking, bump version, add checkpoint protocol
6.1.1
- checkpoint bug fix, docs fix, bump version
6.1.0
Ability to pass a Flask Response as a failure option in a checkpoint.
from flask import render_template
from flask_imp import Flask
from flask_imp.security import checkpoint, SessionCheckpoint
from flask import make_response
def failed_response():
return make_response({
"message": "You must be logged in to access this page."
})
CHECKPOINT = SessionCheckpoint("logged_in", True).action(
fail_response=failed_response
)
def include(app: Flask):
@app.route("/", methods=["GET"])
@checkpoint(CHECKPOINT)
def index():
return render_template(bp.tmpl("index.html"))6.0.3
- fix to 'SessionCheckpoint' value checker
🚨 REMIDER 🚨