2
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-18 03:25:37 +00:00

Bugfix error message missing custom read status column

Bugfix password validation
This commit is contained in:
Ozzieisaacs 2022-06-17 14:24:23 +02:00
parent 29fd4ae4a2
commit c5fc30a1be
3 changed files with 7 additions and 5 deletions

View File

@ -665,7 +665,7 @@ def valid_password(check_password):
if config.config_password_policy:
verify = ""
if config.config_password_min_length > 0:
verify += "^(?=\S{" + str(config.config_password_min_length) + ",}$)"
verify += "^(?=.{" + str(config.config_password_min_length) + ",}$)"
if config.config_password_number:
verify += "(?=.*?\d)"
if config.config_password_lower:

View File

@ -17,12 +17,12 @@
import json
from datetime import datetime
from flask import Blueprint, request, redirect, url_for, flash
from flask import Blueprint, request, redirect, url_for, flash, get_flashed_messages
from flask import session as flask_session
from flask_login import current_user
from flask_babel import format_date
from flask_babel import gettext as _
from sqlalchemy.sql.expression import func, not_, and_, or_, text, true
from sqlalchemy.sql.expression import func, not_, and_, or_, text, false
from sqlalchemy.sql.functions import coalesce
from . import logger, db, calibre_db, config, ub
@ -134,7 +134,9 @@ def adv_search_read_status(read_status):
db_filter = coalesce(db.cc_classes[config.config_read_column].value, False) != True
except (KeyError, AttributeError, IndexError):
log.error("Custom Column No.{} does not exist in calibre database".format(config.config_read_column))
return true()
flash(_("Custom Column No.{} does not exist in calibre database".format(config.config_read_column)),
category="error")
return false()
return db_filter

View File

@ -5,7 +5,7 @@ Flask-Babel>=0.11.1,<2.1.0
Flask-Login>=0.3.2,<0.6.2
Flask-Principal>=0.3.2,<0.5.1
backports_abc>=0.4
Flask>=1.0.2,<2.1.0
Flask>=1.0.2,<2.2.0
iso-639>=0.4.5,<0.5.0
PyPDF3>=1.0.0,<1.0.7
pytz>=2016.10