Skip to content

Commit

Permalink
OAuth2: Improve authorize page wording
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Oct 31, 2023
1 parent 8b03ca6 commit 073dcf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions app/blueprints/oauth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def create_edit_client(username, id_=None):
if id_ is not None:
client = OAuthClient.query.get_or_404(id_)
if client.owner != user:
abort(403)
abort(404)

form = OAuthClientForm(formdata=request.form, obj=client)
if form.validate_on_submit():
Expand Down Expand Up @@ -212,10 +212,8 @@ def delete_client(username, id_):
abort(403)

client = OAuthClient.query.get(id_)
if client is None:
if client is None or client.owner != user:
abort(404)
elif client.owner != user:
abort(403)

add_audit_log(AuditSeverity.NORMAL, current_user,
f"Deleted OAuth2 application {client.title} by {client.owner.username} [{client.id}]",
Expand All @@ -235,10 +233,8 @@ def revoke_all(username, id_):
abort(403)

client = OAuthClient.query.get(id_)
if client is None:
if client is None or client.owner != user:
abort(404)
elif client.owner != user:
abort(403)

add_audit_log(AuditSeverity.NORMAL, current_user,
f"Revoked all user tokens for OAuth2 application {client.title} by {client.owner.username} [{client.id}]",
Expand Down
2 changes: 1 addition & 1 deletion app/templates/oauth/authorize.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="card-title">{{ self.title() }}</h1>
{{ _("Public data only") }}
</p>
<p class="text-muted my-0">
{{ _("Display name, username") }}
{{ _("Read-only access to your public data") }}
</p>
</div>
</div>
Expand Down

0 comments on commit 073dcf9

Please sign in to comment.