This commit is contained in:
Alfie King 2025-04-21 23:35:40 +01:00
parent a8cd23c6d3
commit 98ca120156
3 changed files with 6 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
.env
.venv
app.db
app.db
__pycache__
flask_session

View File

@ -276,7 +276,7 @@ def post_create():
ref = ref[0]
logger.info("Creating post in board ID: %s", board_id)
status = db.create_post(board_id, user_id, content, ref)
status = db.create_post(user_id, board_id, content, ref)
if type(status) is not int:
logger.error("Post creation failed.")
@ -306,9 +306,9 @@ def register():
logger.error("Username length is invalid.")
return render_template('register.html', error="Username must be less than 20 characters.")
if len(password) < 6 or len(password) > 20:
if len(password) < 6 or len(password) > 200:
logger.error("Password length is invalid.")
return render_template('register.html', error="Password must be between 6 and 20 characters.")
return render_template('register.html', error="Password must be between 6 and 200 characters.")
if db.get_user(username):
logger.error("Username already exists: %s", username)