mirror of
https://github.com/chatmail/relay.git
synced 2026-05-16 21:08:57 +00:00
Compare commits
14 Commits
fix/multip
...
hagi/#318-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eae1657de | ||
|
|
736c67ac1f | ||
|
|
295072e57b | ||
|
|
dc17088517 | ||
|
|
514a063142 | ||
|
|
2b96586e12 | ||
|
|
8fde4d929d | ||
|
|
683aefa37c | ||
|
|
b951ec12c5 | ||
|
|
3d8ac6b598 | ||
|
|
9515a37687 | ||
|
|
b5d0b0ad9a | ||
|
|
3f4989223d | ||
|
|
9be0408ab8 |
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
|
- replace crypt with passlib, as crypt will be deprecated in Python 3.13
|
||||||
|
([#319](https://github.com/deltachat/chatmail/pull/319))
|
||||||
|
|
||||||
- Reject DKIM signatures that do not cover the whole message body.
|
- Reject DKIM signatures that do not cover the whole message body.
|
||||||
([#321](https://github.com/deltachat/chatmail/pull/321))
|
([#321](https://github.com/deltachat/chatmail/pull/321))
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ dependencies = [
|
|||||||
"deltachat-rpc-client",
|
"deltachat-rpc-client",
|
||||||
"filelock",
|
"filelock",
|
||||||
"requests",
|
"requests",
|
||||||
|
"passlib",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import crypt
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -11,6 +10,8 @@ from socketserver import (
|
|||||||
UnixStreamServer,
|
UnixStreamServer,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import passlib.hash
|
||||||
|
|
||||||
from .config import Config, read_config
|
from .config import Config, read_config
|
||||||
from .database import Database
|
from .database import Database
|
||||||
|
|
||||||
@@ -23,8 +24,9 @@ class UnknownCommand(ValueError):
|
|||||||
|
|
||||||
def encrypt_password(password: str):
|
def encrypt_password(password: str):
|
||||||
# https://doc.dovecot.org/configuration_manual/authentication/password_schemes/
|
# https://doc.dovecot.org/configuration_manual/authentication/password_schemes/
|
||||||
passhash = crypt.crypt(password, crypt.METHOD_SHA512)
|
pw = passlib.hash.sha512_crypt.hash(password).split("$")
|
||||||
return "{SHA512-CRYPT}" + passhash
|
|
||||||
|
return "{SHA512-CRYPT}$" + pw[1] + "$" + pw[3] + "$" + pw[4]
|
||||||
|
|
||||||
|
|
||||||
def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
||||||
|
|||||||
@@ -649,5 +649,3 @@ def deploy_chatmail(config_path: Path) -> None:
|
|||||||
name="Ensure cron is installed",
|
name="Ensure cron is installed",
|
||||||
packages=["cron"],
|
packages=["cron"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user