{"record":{"id":"4460f0ba22d8a833","repo":"siyuan-note/siyuan","slug":"model-conf-language-34","errorCode":null,"errorMessage":"model.Conf.Language(34)","messagePattern":"model\\.Conf\\.Language\\(34\\)","errorType":"http","errorClass":null,"httpStatus":403,"severity":"warning","filePath":"kernel/server/serve.go","lineNumber":2078,"sourceCode":"\t\t\t// logging.LogDebugf(\"WebDAV [%s %s]\", r.Method, r.URL.String())\n\t\t},\n\t}\n\n\tginGroup := ginServer.Group(\"/webdav\", model.CheckAuth, model.CheckAdminRole)\n\t// ginGroup.Any NOT support extension methods (PROPFIND etc.)\n\tginGroup.Match(WebDavMethods, \"/*path\", func(c *gin.Context) {\n\t\tif util.ReadOnly {\n\t\t\tswitch c.Request.Method {\n\t\t\tcase http.MethodPost,\n\t\t\t\thttp.MethodPut,\n\t\t\t\thttp.MethodDelete,\n\t\t\t\tMethodMkCol,\n\t\t\t\tMethodCopy,\n\t\t\t\tMethodMove,\n\t\t\t\tMethodLock,\n\t\t\t\tMethodUnlock,\n\t\t\t\tMethodPropPatch:\n\t\t\t\tc.AbortWithError(http.StatusForbidden, errors.New(model.Conf.Language(34)))\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\thandler.ServeHTTP(c.Writer, c.Request)\n\t})\n}\n\nfunc serveCalDAV(ginServer *gin.Engine) {\n\t// REF: https://github.com/emersion/hydroxide/blob/master/carddav/carddav.go\n\thandler := caldav.Handler{\n\t\tBackend: &model.CalDavBackend{},\n\t\tPrefix:  model.CalDavPrincipalsPath,\n\t}\n\n\tginServer.Match(CalDavMethods, \"/.well-known/caldav\", func(c *gin.Context) {\n\t\t// logging.LogDebugf(\"CalDAV -> [%s] %s\", c.Request.Method, c.Request.URL.String())\n\t\thandler.ServeHTTP(c.Writer, c.Request)\n\t})","sourceCodeStart":2060,"sourceCodeEnd":2096,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/server/serve.go#L2060-L2096","documentation":"The WebDAV handler in serve.go rejects write-method requests (MKCOL, COPY, MOVE, LOCK, UNLOCK, PROPPATCH) with HTTP 403 and this error message, which is the localized i18n string at key 34 (\"do not support\"-style access-denied message from model.Conf.Language). WebDAV write operations are not supported for this endpoint.","triggerScenarios":"Sending any of the write methods MKCOL/COPY/MOVE/LOCK/UNLOCK/PROPPATCH to the WebDAV endpoint mounted at this route while the request passes auth.","commonSituations":"Desktop OS WebDAV clients or sync tools (e.g. Windows WebDAV mount, third-party sync apps) that attempt to create directories, move files, or lock resources on the SiYuan WebDAV share.","solutions":["Use only read methods (GET, PROPFIND) against this endpoint","Use the SiYuan sync feature or HTTP API instead of WebDAV write operations","Check i18n key 34 in appearance/langs to see the exact user-facing message"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const READONLY_METHODS = new Set([\"GET\",\"HEAD\",\"PROPFIND\",\"OPTIONS\",\"REPORT\"]);\nif (!READONLY_METHODS.has(method)) return fallbackToHttpApi(request);","typeGuard":null,"tryCatchPattern":"try {\n  await webdavRequest(method, url);\n} catch (e) {\n  if (e.status === 403) return useSiYuanHttpApiInstead(e);\n  throw e;\n}","preventionTips":["Treat the SiYuan WebDAV share as read-only in client configuration","Disable write operations (mkdir/move/lock) in sync tools pointed at this endpoint"],"tags":["webdav","http","forbidden","readonly"],"backgroundTag":"permission-denied","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}