Bugfix error message missing custom read status column
Bugfix password validation
This commit is contained in:
parent
29fd4ae4a2
commit
c5fc30a1be
@ -665,7 +665,7 @@ def valid_password(check_password):
|
|||||||
if config.config_password_policy:
|
if config.config_password_policy:
|
||||||
verify = ""
|
verify = ""
|
||||||
if config.config_password_min_length > 0:
|
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:
|
if config.config_password_number:
|
||||||
verify += "(?=.*?\d)"
|
verify += "(?=.*?\d)"
|
||||||
if config.config_password_lower:
|
if config.config_password_lower:
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
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 import session as flask_session
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
from flask_babel import format_date
|
from flask_babel import format_date
|
||||||
from flask_babel import gettext as _
|
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 sqlalchemy.sql.functions import coalesce
|
||||||
|
|
||||||
from . import logger, db, calibre_db, config, ub
|
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
|
db_filter = coalesce(db.cc_classes[config.config_read_column].value, False) != True
|
||||||
except (KeyError, AttributeError, IndexError):
|
except (KeyError, AttributeError, IndexError):
|
||||||
log.error("Custom Column No.{} does not exist in calibre database".format(config.config_read_column))
|
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
|
return db_filter
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ Flask-Babel>=0.11.1,<2.1.0
|
|||||||
Flask-Login>=0.3.2,<0.6.2
|
Flask-Login>=0.3.2,<0.6.2
|
||||||
Flask-Principal>=0.3.2,<0.5.1
|
Flask-Principal>=0.3.2,<0.5.1
|
||||||
backports_abc>=0.4
|
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
|
iso-639>=0.4.5,<0.5.0
|
||||||
PyPDF3>=1.0.0,<1.0.7
|
PyPDF3>=1.0.0,<1.0.7
|
||||||
pytz>=2016.10
|
pytz>=2016.10
|
||||||
|
Loading…
Reference in New Issue
Block a user