Skip to content

Commit

Permalink
Fix for #336
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Jan 28, 2020
1 parent 8868c04 commit e6c4196
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion handlers/PublicHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def successful_login(self, user):
def failed_login(self):
""" Called if username/password is invalid """
ip = self.request.remote_ip
logging.info("[BAN HAMMER] Failed login attempt from: %s" % ip)
logging.info("*** Failed login attempt from: %s" % ip)
failed_logins = self.application.settings["failed_logins"]
if ip in failed_logins:
failed_logins[ip] += 1
Expand Down
2 changes: 1 addition & 1 deletion models/RegistrationToken.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def count(cls):
@classmethod
def by_value(cls, value):
""" Returns a the object with value of value """
return dbsession.query(cls).filter_by(value=str(value)).first()
return dbsession.query(cls).filter_by(value=encode(value)).first()
2 changes: 1 addition & 1 deletion setup/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = "3.3.6"
__version__ = "3.3.7"
2 changes: 1 addition & 1 deletion templates/admin/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h3>{{_("Automatic Ban")}}</h3>

</div>
</div>
{% if user.password == "$p5k2$2bad$hvCaKAvO$77kHcM6nYQO5RK057xsaVTJPO64XArGu" %}
{% if user.validate_password("rootthebox") %}
<div class="span8 alert alert-warning">
<a class="close" data-dismiss="alert" href="#">&times;</a>
<h4 class="alert-heading">{{ _("WARNING") }}</h4>
Expand Down

0 comments on commit e6c4196

Please sign in to comment.