统一SMTP事务入队并复核投递授权与邮件日期
将SMTP信封收件人与授权快照持久保存,按收件人投递并在执行前复核凭据状态;保留原邮件日期,新增队列元数据迁移并补齐相关回归用例源码。
This commit is contained in:
1 parent
7b380277f6
commit
3d6a59092d
16 files changed
+633
-375
No files matched your search
@@ -216,6 +216,13 @@ type Grant struct {
|
||||
securityVersion int
|
||||
}
|
||||
|
||||
func (g *Grant) QueueBinding() (string, int, int, string) {
|
||||
if g == nil {
|
||||
return "", 0, 0, ""
|
||||
}
|
||||
return "notification", g.userID, g.version, digest(g.hash)
|
||||
}
|
||||
|
||||
func Authenticate(engine *xorm.Engine, user models.User, plain string) (*Grant, error) {
|
||||
if len(plain) != 46 || !strings.HasPrefix(plain, "sn_") {
|
||||
return nil, ErrDenied
|
||||
|
||||
Reference in new issue
Block a user