WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a601c09

Browse files
GiteaBotschinkelg
andauthored
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 <[email protected]>
1 parent b5f50ff commit a601c09

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/setting/config_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,14 @@ func LogStartupProblem(skip int, level log.Level, format string, args ...any) {
327327

328328
func deprecatedSetting(rootCfg ConfigProvider, oldSection, oldKey, newSection, newKey, version string) {
329329
if rootCfg.Section(oldSection).HasKey(oldKey) {
330-
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)
330+
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)
331331
}
332332
}
333333

334334
// deprecatedSettingDB add a hint that the configuration has been moved to database but still kept in app.ini
335335
func deprecatedSettingDB(rootCfg ConfigProvider, oldSection, oldKey string) {
336336
if rootCfg.Section(oldSection).HasKey(oldKey) {
337-
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)
337+
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)
338338
}
339339
}
340340

services/context/csrf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *csrfProtector) PrepareForSessionUser(ctx *Context) {
118118
if uidChanged {
119119
_ = ctx.Session.Set(c.opt.oldSessionKey, c.id)
120120
} else if cookieToken != "" {
121-
// If cookie token presents, re-use existing unexpired token, else generate a new one.
121+
// If cookie token present, re-use existing unexpired token, else generate a new one.
122122
if issueTime, ok := ParseCsrfToken(cookieToken); ok {
123123
dur := time.Since(issueTime) // issueTime is not a monotonic-clock, the server time may change a lot to an early time.
124124
if dur >= -CsrfTokenRegenerationInterval && dur <= CsrfTokenRegenerationInterval {

0 commit comments

Comments
 (0)