Skip to content

Commit

Permalink
Add admin_required to admin_add_user
Browse files Browse the repository at this point in the history
Access to the admin_add_user view should be restricted to administrators
only. Unfortunately, I accidentally omitted the `@admin_required`
decorator for this view. Since `@admin_required` encapsulates
`@login_required`, this means that anybody with access to the Document
Interface would be able to create a user accounts.

This is a fix for the issue reported on Bugtraq:
http://seclists.org/bugtraq/2015/Apr/8
  • Loading branch information
garrettr committed Apr 1, 2015
1 parent 718581c commit d83e452
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions securedrop/journalist.py
Expand Up @@ -151,6 +151,7 @@ def admin_index():


@app.route('/admin/add', methods=('GET', 'POST'))
@admin_required
def admin_add_user():
if request.method == 'POST':
form_valid = True
Expand Down

0 comments on commit d83e452

Please sign in to comment.