mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 09:30:31 +00:00
Fix for limiting domains (now no restriction to domain only)
This commit is contained in:
parent
ce66c752c4
commit
8f4253adbd
@ -700,7 +700,7 @@ def speaking_language(languages=None):
|
||||
# example SELECT * FROM @TABLE WHERE 'abcdefg' LIKE Name;
|
||||
# from https://code.luasoftware.com/tutorials/flask/execute-raw-sql-in-flask-sqlalchemy/
|
||||
def check_valid_domain(domain_text):
|
||||
domain_text = domain_text.split('@', 1)[-1].lower()
|
||||
# domain_text = domain_text.split('@', 1)[-1].lower()
|
||||
sql = "SELECT * FROM registration WHERE (:domain LIKE domain and allow = 1);"
|
||||
result = ub.session.query(ub.Registration).from_statement(text(sql)).params(domain=domain_text).all()
|
||||
if not len(result):
|
||||
|
Loading…
Reference in New Issue
Block a user