Skip to content

Commit 7c4045c

Browse files
authored
Merge branch 'main' into lunny/move_initrepository
2 parents 6b82255 + 96e7369 commit 7c4045c

File tree

141 files changed

+1638
-918
lines changed

Some content is hidden

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

141 files changed

+1638
-918
lines changed

.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

.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:

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,12 @@ watch-backend: go-check ## watch backend files and continuously rebuild
410410
test: test-frontend test-backend ## test everything
411411

412412
.PHONY: test-backend
413-
test-backend: ## test frontend files
413+
test-backend: ## test backend files
414414
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
415415
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
416416

417417
.PHONY: test-frontend
418-
test-frontend: node_modules ## test backend files
418+
test-frontend: node_modules ## test frontend files
419419
npx vitest
420420

421421
.PHONY: test-check
@@ -737,7 +737,7 @@ generate-go: $(TAGS_PREREQ)
737737

738738
.PHONY: security-check
739739
security-check:
740-
go run $(GOVULNCHECK_PACKAGE) ./...
740+
go run $(GOVULNCHECK_PACKAGE) -show color ./...
741741

742742
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
743743
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

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)