Removes insecure clear_inactive_users endpoint (#85)
This commit is contained in:
parent
c5dd461bdc
commit
fd1195ffaa
@ -455,7 +455,7 @@ def settings():
|
|||||||
}
|
}
|
||||||
return render_template('settings.html', info=instanceInfo, config=config, admin=current_user.is_admin)
|
return render_template('settings.html', info=instanceInfo, config=config, admin=current_user.is_admin)
|
||||||
|
|
||||||
@app.route('/clear_inactive_users/<phash>')
|
'''@app.route('/clear_inactive_users/<phash>')
|
||||||
@login_required
|
@login_required
|
||||||
def clear_inactive_users(phash):
|
def clear_inactive_users(phash):
|
||||||
ahash = User.query.filter_by(username=config['admin_user']).first().password_hash
|
ahash = User.query.filter_by(username=config['admin_user']).first().password_hash
|
||||||
@ -474,7 +474,7 @@ def clear_inactive_users(phash):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
else:
|
else:
|
||||||
flash("You must be admin for this action")
|
flash("You must be admin for this action")
|
||||||
return redirect(request.referrer)
|
return redirect(request.referrer)'''
|
||||||
|
|
||||||
@app.route('/export')
|
@app.route('/export')
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
<div class="control-me"><a href="/deleteme"><button class="ui red button">Delete account</button></a></div>
|
<div class="control-me"><a href="/deleteme"><button class="ui red button">Delete account</button></a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
{% if admin %}
|
{% if admin %}
|
||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
<h2 class="ui centered header">
|
<h2 class="ui centered header">
|
||||||
@ -87,7 +88,7 @@
|
|||||||
<label for="toggle">Delete accounts with last login older than {{config.max_old_user_days}} days.</label> <br>
|
<label for="toggle">Delete accounts with last login older than {{config.max_old_user_days}} days.</label> <br>
|
||||||
<a href="/clear_inactive_users/{{current_user.password_hash}}"><button class="ui red button">Delete</button></a></div>
|
<a href="/clear_inactive_users/{{current_user.password_hash}}"><button class="ui red button">Delete</button></a></div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}-->
|
||||||
|
|
||||||
<!-- INSTANCE INFO -->
|
<!-- INSTANCE INFO -->
|
||||||
<h1 class="ui header">{{config.serverName}} Info</h1>
|
<h1 class="ui header">{{config.serverName}} Info</h1>
|
||||||
|
Reference in New Issue
Block a user