Update to V5.5

This commit is contained in:
Red Queen
2023-10-31 11:00:41 +01:00
parent 42749bedc4
commit ffdbde06bc
12 changed files with 41 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
__author__ = "Zhang Huangbin"
__author_mail__ = "zhb@iredmail.org"
__version_ldap__ = "5.5"
__version_sql__ = "5.4"
__version_ldap__ = "5.6"
__version_sql__ = "5.5"
__url_license_terms__ = "http://www.iredmail.org/pricing.html#EULA"

View File

@@ -64,6 +64,7 @@ SKIN = "default"
# - Without authentication: HTTP_PROXY = "http://192.168.1.1:3128"
# - With authentication: HTTP_PROXY = "http://user:password@192.168.1.1:3128"
HTTP_PROXY = ""
# Specify hosts which shouldn't be reached via proxy.
# It should be a comma-separated list of hostname suffixes, optionally with
# `:port` appended, for example: `cern.ch,ncsa.uiuc.edu,some.host:8080`.

View File

@@ -188,8 +188,10 @@ def verify_bcrypt_password(challenge_password: str, plain_password: str) -> bool
except:
return False
crypt_suffixes = ("{CRYPT}$2a$", "{CRYPT}$2b$",
"{crypt}$2a$", "{crypt}$2b$")
crypt_suffixes = (
"{CRYPT}$2a$", "{CRYPT}$2b$", "{CRYPT}$2x$", "{CRYPT}$2y$",
"{crypt}$2a$", "{crypt}$2b$", "{crypt}$2x$", "{crypt}$2y$",
)
blf_crypt_suffixes = ("{BLF-CRYPT}", "{blf-crypt}")
if challenge_password.startswith(crypt_suffixes):

View File

@@ -459,7 +459,7 @@ TIMEZONES = {
"Antarctica/Casey": "GMT+08:00",
"Asia/Beijing": "GMT+08:00",
"Asia/Brunei": "GMT+08:00",
"Asia/Chita": "GMT+08:00",
"Asia/China": "GMT+08:00",
"Asia/Choibalsan": "GMT+08:00",
"Asia/Hong_Kong": "GMT+08:00",
"Asia/Irkutsk": "GMT+08:00",

View File

@@ -720,14 +720,17 @@ def delete_maillists(accounts, keep_archive=True, conn=None):
if not iredutils.is_domain(domain):
return True,
sql_vars = {'domain': domain, 'accounts': accounts}
sql_vars = {
'domain': domain,
'accounts': accounts,
}
try:
if not conn:
_wrap = SQLWrap()
conn = _wrap.conn
for tbl in ['maillists', 'maillist_owners']:
for tbl in ['maillists', 'maillist_owners', 'moderators']:
conn.delete(tbl,
vars=sql_vars,
where='address IN $accounts')

View File

@@ -477,7 +477,7 @@ def get_paged_users(conn,
qr = conn.query("""
SELECT
mailbox.username, mailbox.name, mailbox.quota,
LOWER(mailbox.username) AS username, mailbox.name, mailbox.quota,
mailbox.employeeid, mailbox.active, mailbox.isadmin,
mailbox.isglobaladmin, mailbox.passwordlastchange,
%s
@@ -503,7 +503,7 @@ def get_paged_users(conn,
'mailbox',
vars=sql_vars,
# Just query what we need to reduce memory use.
what='username,name,quota,employeeid,active,isadmin,isglobaladmin,passwordlastchange',
what='LOWER(username) AS username,name,quota,employeeid,active,isadmin,isglobaladmin,passwordlastchange',
where=sql_where,
order=sql_order,
limit=settings.PAGE_SIZE_LIMIT,
@@ -515,7 +515,7 @@ def get_paged_users(conn,
'mailbox',
vars=sql_vars,
# Just query what we need to reduce memory use.
what='username,name,quota,employeeid,active,isadmin,isglobaladmin,passwordlastchange',
what='LOWER(username) AS username,name,quota,employeeid,active,isadmin,isglobaladmin,passwordlastchange',
where=sql_where,
order='username ASC',
limit=settings.PAGE_SIZE_LIMIT,