Browse Source

Revert "PBKDF2 => scrypt; fixed postbit bug"

This reverts commit 89e4f78f1520a87753061fc50a3e637ac870400a.

Conflicts:
	flaskbb/user/models.py
Casper Van Gheluwe 10 years ago
parent
commit
3848ae6d37
4 changed files with 6 additions and 10 deletions
  1. 1 1
      flaskbb/forum/views.py
  2. 1 1
      flaskbb/templates/forum/topic.html
  3. 3 2
      flaskbb/user/models.py
  4. 1 6
      requirements.txt

+ 1 - 1
flaskbb/forum/views.py

@@ -193,7 +193,7 @@ def lock_topic(topic_id, slug=None):
     # TODO: Bulk lock
 
     if not can_moderate(user=current_user, forum=topic.forum):
-        flash("You do not have the permissions to lock this topic", "danger")
+        flash("Yo do not have the permissions to lock this topic", "danger")
         return redirect(topic.url)
 
     topic.locked = True

+ 1 - 1
flaskbb/templates/forum/topic.html

@@ -149,7 +149,7 @@
                     <a href="{{ url_for('user.new_message') }}?to_user={{ post.user.username }}">PM</a>
                     {% endif %}
                     {% if post.user.website %}
-                    {% if current_user.is_authenticated() %}| {% endif %}<a href="{{post.user.website}}">Website</a>
+                    | <a href="{{post.user.website}}">Website</a>
                     {% endif %}
                 </span>
 

+ 3 - 2
flaskbb/user/models.py

@@ -13,7 +13,7 @@ from datetime import datetime
 
 from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
 from itsdangerous import SignatureExpired
-from werkzeug import generate_password_hash, check_password_hash
+from werkzeug.security import generate_password_hash, check_password_hash
 from flask import current_app, url_for
 from flask.ext.login import UserMixin, AnonymousUserMixin
 from flaskbb.extensions import db, cache
@@ -80,7 +80,7 @@ class User(db.Model, UserMixin):
     id = db.Column(db.Integer, primary_key=True)
     username = db.Column(db.String(200), unique=True, nullable=False)
     email = db.Column(db.String(200), unique=True, nullable=False)
-    _password = db.Column('password', db.String(88), nullable=False)
+    _password = db.Column('password', db.String(120), nullable=False)
     date_joined = db.Column(db.DateTime, default=datetime.utcnow())
     lastseen = db.Column(db.DateTime, default=datetime.utcnow())
     birthday = db.Column(db.DateTime)
@@ -174,6 +174,7 @@ class User(db.Model, UserMixin):
         """Generates a password hash for the provided password"""
         self._password = generate_password_hash(password)
 
+    # Hide password encryption by exposing password field only.
     password = db.synonym('_password',
                           descriptor=property(_get_password,
                                               _set_password))

+ 1 - 6
requirements.txt

@@ -8,7 +8,6 @@ Flask-Migrate==1.2.0
 Flask-Plugins==1.4
 Flask-SQLAlchemy==1.0
 Flask-Script==2.0.5
-Flask-Scrypt==0.1.3.6
 Flask-Themes2==0.1.3
 Flask-WTF==0.10
 Jinja2==2.7.3
@@ -27,9 +26,5 @@ pytest==2.5.2
 pytest-random==0.02
 pytest-cov==1.7.0
 redis==2.10.1
-scrypt==0.6.1
 simplejson==3.6.0
-wsgiref==0.1.2
-
-https://github.com/miguelgrinberg/Flask-WhooshAlchemy/tarball/master#egg
-https://github.com/frol/postmarkup/tarball/master#egg
+wsgiref==0.1.2