mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
fix: handle invalid page numbers (#2313)
This commit is contained in:
parent
813de9d40b
commit
8ba75befa8
3 changed files with 12 additions and 3 deletions
|
@ -227,7 +227,10 @@ def alias_contact_manager(alias_id):
|
|||
|
||||
page = 0
|
||||
if request.args.get("page"):
|
||||
page = int(request.args.get("page"))
|
||||
try:
|
||||
page = int(request.args.get("page"))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
query = request.args.get("query") or ""
|
||||
|
||||
|
|
|
@ -71,7 +71,10 @@ def index():
|
|||
|
||||
page = 0
|
||||
if request.args.get("page"):
|
||||
page = int(request.args.get("page"))
|
||||
try:
|
||||
page = int(request.args.get("page"))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
highlight_alias_id = None
|
||||
if request.args.get("highlight_alias_id"):
|
||||
|
|
|
@ -43,7 +43,10 @@ def notification_route(notification_id):
|
|||
def notifications_route():
|
||||
page = 0
|
||||
if request.args.get("page"):
|
||||
page = int(request.args.get("page"))
|
||||
try:
|
||||
page = int(request.args.get("page"))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
notifications = (
|
||||
Notification.filter_by(user_id=current_user.id)
|
||||
|
|
Loading…
Reference in a new issue