Skip to content

Commit 34937e3

Browse files
Merge branch 'main' into feat/actions-token-permissions
2 parents 5833ca6 + d83a071 commit 34937e3

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
@@ -337,14 +337,14 @@ func LogStartupProblem(skip int, level log.Level, format string, args ...any) {
337337

338338
func deprecatedSetting(rootCfg ConfigProvider, oldSection, oldKey, newSection, newKey, version string) {
339339
if rootCfg.Section(oldSection).HasKey(oldKey) {
340-
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)
340+
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)
341341
}
342342
}
343343

344344
// deprecatedSettingDB add a hint that the configuration has been moved to database but still kept in app.ini
345345
func deprecatedSettingDB(rootCfg ConfigProvider, oldSection, oldKey string) {
346346
if rootCfg.Section(oldSection).HasKey(oldKey) {
347-
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)
347+
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)
348348
}
349349
}
350350

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)