Skip to content

Commit

Permalink
remove code alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhigh committed Jun 28, 2024
1 parent 2847dea commit fc06e45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/view/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def ExtRenderWithRules():
ruleStr = args.get('rules', '')
user = KeUser.get_or_none(KeUser.name == userName)
if not user or user.share_links.get('key') != key:
return HTML_TPL.format(_("The username '{}' does not exist.").format(userName))
return HTML_TPL.format(_("The username '{}' does not exist.").format(escape(userName)))
elif not url or not ruleStr:
return HTML_TPL.format(_("Some parameters are missing or wrong."))

Expand Down
3 changes: 2 additions & 1 deletion application/view/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def LoginPost():
user.save()

if next_url:
url = next_url
parts = urlparse(next_url)
url = url_for("bpLogs.Mylogs") if parts.netloc or parts.scheme else next_url
elif not user.cfg('sender') or (name == passwd):
url = url_for('bpAdmin.AdminAccountChange', name=name)
elif not user.cfg('kindle_email'):
Expand Down

0 comments on commit fc06e45

Please sign in to comment.