Skip to content

Commit 433d9cf

Browse files
authored
Merge branch 'main' into issues-page-toolbar-layout-adjust
2 parents 9420313 + 321cbcb commit 433d9cf

File tree

451 files changed

+20267
-32285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+20267
-32285
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {

.dockerignore

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@ cpu.out
7979
/public/assets/fonts
8080
/public/assets/img/avatar
8181
/vendor
82-
/web_src/fomantic/node_modules
83-
/web_src/fomantic/build/*
84-
!/web_src/fomantic/build/semantic.js
85-
!/web_src/fomantic/build/semantic.css
86-
!/web_src/fomantic/build/themes
87-
/web_src/fomantic/build/themes/*
88-
!/web_src/fomantic/build/themes/default
89-
/web_src/fomantic/build/themes/default/assets/*
90-
!/web_src/fomantic/build/themes/default/assets/fonts
91-
/web_src/fomantic/build/themes/default/assets/fonts/*
92-
!/web_src/fomantic/build/themes/default/assets/fonts/icons.woff2
93-
!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
9482
/VERSION
9583
/.air
9684
/.go-licenses

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ insert_final_newline = true
1212
[*.{go,tmpl,html}]
1313
indent_style = tab
1414

15+
[go.*]
16+
indent_style = tab
17+
1518
[templates/custom/*.tmpl]
1619
insert_final_newline = false
1720

.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ module.exports = {
104104
'@vitest/no-disabled-tests': [0],
105105
'@vitest/no-done-callback': [0],
106106
'@vitest/no-duplicate-hooks': [0],
107-
'@vitest/no-focused-tests': [0],
107+
'@vitest/no-focused-tests': [2],
108108
'@vitest/no-hooks': [0],
109109
'@vitest/no-identical-title': [2],
110110
'@vitest/no-interpolation-in-snapshots': [0],
@@ -155,7 +155,7 @@ module.exports = {
155155
'eslint-plugin-vue-scoped-css',
156156
],
157157
extends: [
158-
'plugin:vue/vue3-recommended',
158+
'plugin:vue/recommended',
159159
'plugin:vue-scoped-css/vue3-recommended',
160160
],
161161
rules: {

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
/public/assets/img/svg/*.svg linguist-generated
66
/templates/swagger/v1_json.tmpl linguist-generated
77
/vendor/** -text -eol linguist-vendored
8-
/web_src/fomantic/build/** linguist-generated
9-
/web_src/fomantic/_site/globals/site.variables linguist-language=Less
108
/web_src/js/vendor/** -text -eol linguist-vendored
119
Dockerfile.* linguist-language=Dockerfile

.github/workflows/pull-db-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
ports:
9999
- "9200:9200"
100100
meilisearch:
101-
image: getmeili/meilisearch:v1.2.0
101+
image: getmeili/meilisearch:v1
102102
env:
103103
MEILI_ENV: development # disable auth
104104
ports:

.gitignore

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@ cpu.out
8484
/public/assets/fonts
8585
/public/assets/licenses.txt
8686
/vendor
87-
/web_src/fomantic/node_modules
88-
/web_src/fomantic/build/*
89-
!/web_src/fomantic/build/semantic.js
90-
!/web_src/fomantic/build/semantic.css
91-
!/web_src/fomantic/build/themes
92-
/web_src/fomantic/build/themes/*
93-
!/web_src/fomantic/build/themes/default
94-
/web_src/fomantic/build/themes/default/assets/*
95-
!/web_src/fomantic/build/themes/default/assets/fonts
96-
/web_src/fomantic/build/themes/default/assets/fonts/*
97-
!/web_src/fomantic/build/themes/default/assets/fonts/icons.woff2
98-
!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
9987
/VERSION
10088
/.air
10189
/.go-licenses

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ This changelog goes through the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.com).
66

7+
## [1.23.6](https://github.com/go-gitea/gitea/releases/tag/v1.23.6) - 2025-03-24
8+
9+
* SECURITY
10+
* Fix LFS URL (#33840) (#33843)
11+
* Update jwt and redis packages (#33984) (#33987)
12+
* Update golang crypto and net (#33989)
13+
* BUGFIXES
14+
* Drop timeout for requests made to the internal hook api (#33947) (#33970)
15+
* Fix maven panic when no package exists (#33888) (#33889)
16+
* Fix markdown render (#33870) (#33875)
17+
* Fix auto concurrency cancellation skips commit status updates (#33764) (#33849)
18+
* Fix oauth2 auth (#33961) (#33962)
19+
* Fix incorrect 1.23 translations (#33932)
20+
* Try to figure out attribute checker problem (#33901) (#33902)
21+
* Ignore trivial errors when updating push data (#33864) (#33887)
22+
* Fix some UI problems for 1.23 (#33856)
23+
* Removing unwanted ui container (#33833) (#33835)
24+
* Support disable passkey auth (#33348) (#33819)
25+
* Do not call "git diff" when listing PRs (#33817)
26+
* Try to fix ACME (3rd) (#33807) (#33808)
27+
* Fix incorrect code search indexer options (#33992) #33999
28+
729
## [1.23.5](https://github.com/go-gitea/gitea/releases/tag/v1.23.5) - 2025-03-04
830

931
* SECURITY

Makefile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ COMMA := ,
2626
XGO_VERSION := go-1.24.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
29-
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.1.2
29+
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.2.1
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected].5
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected].7
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
@@ -115,8 +115,6 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
115115
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
116116
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
117117

118-
FOMANTIC_WORK_DIR := web_src/fomantic
119-
120118
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
121119
WEBPACK_CONFIGS := webpack.config.js tailwind.config.js
122120
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
@@ -140,7 +138,7 @@ TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
140138

141139
TEST_TAGS ?= $(TAGS_SPLIT) sqlite sqlite_unlock_notify
142140

143-
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
141+
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
144142

145143
GO_DIRS := build cmd models modules routers services tests
146144
WEB_DIRS := web_src/js web_src/css
@@ -412,12 +410,12 @@ watch-backend: go-check ## watch backend files and continuously rebuild
412410
test: test-frontend test-backend ## test everything
413411

414412
.PHONY: test-backend
415-
test-backend: ## test frontend files
413+
test-backend: ## test backend files
416414
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
417415
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
418416

419417
.PHONY: test-frontend
420-
test-frontend: node_modules ## test backend files
418+
test-frontend: node_modules ## test frontend files
421419
npx vitest
422420

423421
.PHONY: test-check
@@ -739,7 +737,7 @@ generate-go: $(TAGS_PREREQ)
739737

740738
.PHONY: security-check
741739
security-check:
742-
go run $(GOVULNCHECK_PACKAGE) ./...
740+
go run $(GOVULNCHECK_PACKAGE) -show color ./...
743741

744742
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
745743
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
@@ -847,19 +845,6 @@ update-py: node-check | node_modules ## update py dependencies
847845
poetry install
848846
@touch .venv
849847

850-
.PHONY: fomantic
851-
fomantic: ## build fomantic files
852-
rm -rf $(FOMANTIC_WORK_DIR)/build
853-
cd $(FOMANTIC_WORK_DIR) && npm install --no-save
854-
cp -f $(FOMANTIC_WORK_DIR)/theme.config.less $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/theme.config
855-
cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
856-
$(SED_INPLACE) -e 's/ overrideBrowserslist\r/ overrideBrowserslist: ["defaults"]\r/g' $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/tasks/config/tasks.js
857-
cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
858-
# fomantic uses "touchstart" as click event for some browsers, it's not ideal, so we force fomantic to always use "click" as click event
859-
$(SED_INPLACE) -e 's/clickEvent[ \t]*=/clickEvent = "click", unstableClickEvent =/g' $(FOMANTIC_WORK_DIR)/build/semantic.js
860-
$(SED_INPLACE) -e 's/\r//g' $(FOMANTIC_WORK_DIR)/build/semantic.css $(FOMANTIC_WORK_DIR)/build/semantic.js
861-
rm -f $(FOMANTIC_WORK_DIR)/build/*.min.*
862-
863848
.PHONY: webpack
864849
webpack: $(WEBPACK_DEST) ## build webpack files
865850

assets/go-licenses.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/admin_auth_ldap.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,34 @@ var (
127127
&cli.UintFlag{
128128
Name: "page-size",
129129
Usage: "Search page size.",
130+
},
131+
&cli.BoolFlag{
132+
Name: "enable-groups",
133+
Usage: "Enable LDAP groups",
134+
},
135+
&cli.StringFlag{
136+
Name: "group-search-base-dn",
137+
Usage: "The LDAP base DN at which group accounts will be searched for",
138+
},
139+
&cli.StringFlag{
140+
Name: "group-member-attribute",
141+
Usage: "Group attribute containing list of users",
142+
},
143+
&cli.StringFlag{
144+
Name: "group-user-attribute",
145+
Usage: "User attribute listed in group",
146+
},
147+
&cli.StringFlag{
148+
Name: "group-filter",
149+
Usage: "Verify group membership in LDAP",
150+
},
151+
&cli.StringFlag{
152+
Name: "group-team-map",
153+
Usage: "Map LDAP groups to Organization teams",
154+
},
155+
&cli.BoolFlag{
156+
Name: "group-team-map-removal",
157+
Usage: "Remove users from synchronized teams if user does not belong to corresponding LDAP group",
130158
})
131159

132160
ldapSimpleAuthCLIFlags = append(commonLdapCLIFlags,
@@ -273,6 +301,27 @@ func parseLdapConfig(c *cli.Context, config *ldap.Source) error {
273301
if c.IsSet("skip-local-2fa") {
274302
config.SkipLocalTwoFA = c.Bool("skip-local-2fa")
275303
}
304+
if c.IsSet("enable-groups") {
305+
config.GroupsEnabled = c.Bool("enable-groups")
306+
}
307+
if c.IsSet("group-search-base-dn") {
308+
config.GroupDN = c.String("group-search-base-dn")
309+
}
310+
if c.IsSet("group-member-attribute") {
311+
config.GroupMemberUID = c.String("group-member-attribute")
312+
}
313+
if c.IsSet("group-user-attribute") {
314+
config.UserUID = c.String("group-user-attribute")
315+
}
316+
if c.IsSet("group-filter") {
317+
config.GroupFilter = c.String("group-filter")
318+
}
319+
if c.IsSet("group-team-map") {
320+
config.GroupTeamMap = c.String("group-team-map")
321+
}
322+
if c.IsSet("group-team-map-removal") {
323+
config.GroupTeamMapRemoval = c.Bool("group-team-map-removal")
324+
}
276325
return nil
277326
}
278327

cmd/admin_auth_ldap_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ func TestAddLdapBindDn(t *testing.T) {
5151
"--attributes-in-bind",
5252
"--synchronize-users",
5353
"--page-size", "99",
54+
"--enable-groups",
55+
"--group-search-base-dn", "ou=group,dc=full-domain-bind,dc=org",
56+
"--group-member-attribute", "memberUid",
57+
"--group-user-attribute", "uid",
58+
"--group-filter", "(|(cn=gitea_users)(cn=admins))",
59+
"--group-team-map", `{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}`,
60+
"--group-team-map-removal",
5461
},
5562
source: &auth.Source{
5663
Type: auth.LDAP,
@@ -78,6 +85,13 @@ func TestAddLdapBindDn(t *testing.T) {
7885
AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)",
7986
RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)",
8087
Enabled: true,
88+
GroupsEnabled: true,
89+
GroupDN: "ou=group,dc=full-domain-bind,dc=org",
90+
GroupMemberUID: "memberUid",
91+
UserUID: "uid",
92+
GroupFilter: "(|(cn=gitea_users)(cn=admins))",
93+
GroupTeamMap: `{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}`,
94+
GroupTeamMapRemoval: true,
8195
},
8296
},
8397
},
@@ -510,6 +524,13 @@ func TestUpdateLdapBindDn(t *testing.T) {
510524
"--bind-password", "secret-bind-full",
511525
"--synchronize-users",
512526
"--page-size", "99",
527+
"--enable-groups",
528+
"--group-search-base-dn", "ou=group,dc=full-domain-bind,dc=org",
529+
"--group-member-attribute", "memberUid",
530+
"--group-user-attribute", "uid",
531+
"--group-filter", "(|(cn=gitea_users)(cn=admins))",
532+
"--group-team-map", `{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}`,
533+
"--group-team-map-removal",
513534
},
514535
id: 23,
515536
existingAuthSource: &auth.Source{
@@ -545,6 +566,13 @@ func TestUpdateLdapBindDn(t *testing.T) {
545566
AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)",
546567
RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)",
547568
Enabled: true,
569+
GroupsEnabled: true,
570+
GroupDN: "ou=group,dc=full-domain-bind,dc=org",
571+
GroupMemberUID: "memberUid",
572+
UserUID: "uid",
573+
GroupFilter: "(|(cn=gitea_users)(cn=admins))",
574+
GroupTeamMap: `{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}`,
575+
GroupTeamMapRemoval: true,
548576
},
549577
},
550578
},

0 commit comments

Comments
 (0)