From a601c09826a699a86ee64ba8a8b09dd5bb101c58 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 10 Dec 2025 18:45:56 +0800 Subject: [PATCH] Changed a small typo in an error message and code comments. (#36117) (#36123) Backport #36117 by @schinkelg Changed a small typo in an English error message and code comments. Very small PR. Co-authored-by: Ger Schinkel --- modules/setting/config_provider.go | 4 ++-- services/context/csrf.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/setting/config_provider.go b/modules/setting/config_provider.go index 777885cb4f..e9e051e56d 100644 --- a/modules/setting/config_provider.go +++ b/modules/setting/config_provider.go @@ -327,14 +327,14 @@ func LogStartupProblem(skip int, level log.Level, format string, args ...any) { func deprecatedSetting(rootCfg ConfigProvider, oldSection, oldKey, newSection, newKey, version string) { if rootCfg.Section(oldSection).HasKey(oldKey) { - LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` presents, please use `[%s].%s` instead because this fallback will be/has been removed in %s", oldSection, oldKey, newSection, newKey, version) + LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` present, please use `[%s].%s` instead because this fallback will be/has been removed in %s", oldSection, oldKey, newSection, newKey, version) } } // deprecatedSettingDB add a hint that the configuration has been moved to database but still kept in app.ini func deprecatedSettingDB(rootCfg ConfigProvider, oldSection, oldKey string) { if rootCfg.Section(oldSection).HasKey(oldKey) { - LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` presents but it won't take effect because it has been moved to admin panel -> config setting", oldSection, oldKey) + LogStartupProblem(1, log.ERROR, "Deprecation: config option `[%s].%s` present but it won't take effect because it has been moved to admin panel -> config setting", oldSection, oldKey) } } diff --git a/services/context/csrf.go b/services/context/csrf.go index f190465bdb..aa99f34b03 100644 --- a/services/context/csrf.go +++ b/services/context/csrf.go @@ -118,7 +118,7 @@ func (c *csrfProtector) PrepareForSessionUser(ctx *Context) { if uidChanged { _ = ctx.Session.Set(c.opt.oldSessionKey, c.id) } else if cookieToken != "" { - // If cookie token presents, re-use existing unexpired token, else generate a new one. + // If cookie token present, re-use existing unexpired token, else generate a new one. if issueTime, ok := ParseCsrfToken(cookieToken); ok { dur := time.Since(issueTime) // issueTime is not a monotonic-clock, the server time may change a lot to an early time. if dur >= -CsrfTokenRegenerationInterval && dur <= CsrfTokenRegenerationInterval {