Repository navigation
Conversation
jyxjjj
requested changes
Nov 13, 2026
jyxjjj
left a comment
Member
There was a problem hiding this comment.
[P2] ClassifyAuthError 漏掉了 LDAP 用户不存在的凭据失败。HandleLdapLogin 在查询不到用户时返回普通 error,既不是 ErrFailedLdapAuth,也不是 gorm.ErrRecordNotFound。开启 LDAP 后,用不存在的用户名请求 WebDAV,会从原来的 401 且累计失败次数,变成 500 且完全不计数,FTP/SFTP 也会漏掉计数。要把 LDAP 的无匹配用户结果明确标成鉴权失败,保持 401 和失败次数,连接、查询及数据库故障再走服务错误分支。
Reviewed or refined by GPT-6.1-Sol Medium
HW618
force-pushed
the
fix/sqlite-webdav-lock-starvation
branch
from
November 13, 2026 04:09
b2f07fd to
46d5739
Compare
- Shorten WebDAV dead-props transactions so PROPFIND does not hold long DB locks - Map SQLITE_BUSY / nested-tx failures to 503 (Subsonic code 0) without lockout - Keep unknown user, wrong password, and LDAP unmatched results as auth failures - Restrict LDAP auto-register fallback to local RecordNotFound only - Hide infrastructure error details from unauthenticated clients - Align Emby/Subsonic AppKey and session lookups with the same classification Co-authored-by: Cursor <cursoragent@cursor.com>
HW618
force-pushed
the
fix/sqlite-webdav-lock-starvation
branch
from
November 13, 2026 05:52
46d5739 to
85ad51c
Compare
Author
|
Update for reviewers:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Rebased onto latest
mainas a single commit for easier review.Unify authentication failure handling so SQLite lock contention and other infrastructure errors are not treated as bad credentials, and shorten WebDAV dead-props transaction scope to reduce SQLite lock starvation.
0) without advancing lockout countersRecordNotFoundonlySQLite DSN / WAL: this PR no longer changes bootstrap drivers. Upstream
#3344already enables WAL/busy_timeoutviaappendDSNParams; this branch adopts that.0Related Issues / 关联 Issue
Relates to #3298 / #3342. Supersedes the earlier multi-commit / merge history on this PR head.
Testing / 测试
go test ./internal/errs/ ./server/common/ ./server/ ./server/handles/ ./server/middlewares/ ./server/webdav/ ./internal/op/ -count=1openlist:auth-classify-local-test127.0.0.1:15244(isolated data; not production volume)/api/meChecklist / 检查清单
gofmtwhere applicable (avoided whole-fileemby.goalignment churn outside semantic edits).AI Disclosure / AI 使用声明
Tools used:
Usage scope:
Code generation
Refactoring
Tests
Review assistance
I have reviewed and validated all AI-assisted content included in this PR.
I have ensured that all AI-assisted commits include
Co-Authored-Byattribution (latest squash commit follows AGENTS.md: no invented trailer for unlisted assistants).I can reproduce all AI-assisted content included in this PR without any AI tools.