Skip to content

Commit 7c44a3a

Browse files
authored
Merge branch 'main' into enable-spellcheck-easymde
2 parents 7b34b4f + cdd6371 commit 7c44a3a

File tree

356 files changed

+4540
-3997
lines changed

Some content is hidden

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

356 files changed

+4540
-3997
lines changed
File renamed without changes.

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
* text=auto eol=lf
22
*.tmpl linguist-language=Handlebars
3-
/.eslintrc linguist-language=YAML
4-
/.stylelintrc linguist-language=YAML
53
/public/vendor/** -text -eol linguist-vendored
64
/vendor/** -text -eol linguist-vendored
75
/web_src/fomantic/build/** linguist-generated
File renamed without changes.

SECURITY.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,76 @@
33
The Gitea maintainers take security seriously.
44
If you discover a security issue, please bring it to their attention right away!
55

6-
### Reporting a Vulnerability
6+
## Reporting a Vulnerability
77

88
Please **DO NOT** file a public issue, instead send your report privately to `[email protected]`.
99

10+
## Protecting Security Information
11+
12+
Due to the sensitive nature of security information, you can use below GPG public key encrypt your mail body.
13+
14+
The PGP key is valid until June 24, 2024.
15+
Key ID: 6FCD2D5B
16+
Key Type: RSA
17+
Expires: 6/24/2024
18+
Key Size: 4096/4096
19+
Fingerprint: 3DE0 3D1E 144A 7F06 9359 99DC AAFD 2381 6FCD 2D5B
20+
UserID: Gitea Security <[email protected]>
21+
22+
```
23+
-----BEGIN PGP PUBLIC KEY BLOCK-----
24+
25+
mQINBGK1Z/4BEADFMqXA9DeeChmSxUjF0Be5sq99ZUhgrZjcN/wOzz0wuCJZC0l8
26+
4uC+d6mfv7JpJYlzYzOK97/x5UguKHkYNZ6mm1G9KHaXmoIBDLKDzfPdJopVNv2r
27+
OajijaE0uMCnMjadlg5pbhMLRQG8a9J32yyaz7ZEAw72Ab31fvvcA53NkuqO4j2w
28+
k7dtFQzhbNOYV0VffQT90WDZdalYH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hoCtppXisbexZnCpuS0x
60+
Zdlm2T14KJ3LABEBAAGJAjwEGAEIACYWIQQ94D0eFEp/BpNZmdyq/SOBb80tWwUC
61+
YrVn/gIbDAUJA8JnAAAKCRCq/SOBb80tWyTBD/9AGpW6QoDF7zYjHAozH9S5RGCA
62+
Y7E82dG/0xmFUwPprAG0BKmmgU6TiipyVGmKIXGYYYU92pMnbvXkYQMoa+WJNncN
63+
D3fY52UeXeffTf4cFpStlzi9xgYtOLhFamzYu/4xhkjOX+xhOSXscCiFRyT8cF3B
64+
O6c5BHU+Zj0/rGPgOyPUbx7l7B9MubB/41nNX35k08e+8T3wtWDb4XF+15HnRfva
65+
6fblO8wgU25Orv2Rm1jnKGa9DxJ8nE40IMrqDapENtDuL+zKJsvR0+ptWvEyL56U
66+
GtJJG5un6mXiLKuRQT0DEv4MdZRHDgDstDnqcbEiazVEbUuvhZZob6lRY2A19m1+
67+
7zfnDxkhqCA1RCnv4fdvcPdCMMFHwLpdhjgW0aI/uwgwrvsEz5+JRlnLvdQHlPAg
68+
q7l2fGcBSpz9U0ayyfRPjPntsNCtZl1UDxGLeciPkZhyG84zEWQbk/j52ZpRN+Ik
69+
ALpRLa8RBFmFSmXDUmwQrmm1EmARyQXwweKU31hf8ZGbCp2lPuRYm1LuGiirXSVP
70+
GysjRAJgW+VRpBKOzFQoUAUbReVWSaCwT8s17THzf71DdDb6CTj31jMLLYWwBpA/
71+
i73DgobDZMIGEZZC1EKqza8eh11xfyHFzGec03tbh+lIen+5IiRtWiEWkDS9ll0G
72+
zgS/ZdziCvdAutqnGA==
73+
=gZWO
74+
-----END PGP PUBLIC KEY BLOCK-----
75+
76+
```
77+
1078
Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.

cmd/manager_logging.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ var (
174174
Action: runAddSMTPLogger,
175175
},
176176
},
177+
}, {
178+
Name: "log-sql",
179+
Usage: "Set LogSQL",
180+
Flags: []cli.Flag{
181+
cli.BoolFlag{
182+
Name: "debug",
183+
}, cli.BoolFlag{
184+
Name: "off",
185+
Usage: "Switch off SQL logging",
186+
},
187+
},
188+
Action: runSetLogSQL,
177189
},
178190
},
179191
}
@@ -381,3 +393,18 @@ func runReleaseReopenLogging(c *cli.Context) error {
381393
fmt.Fprintln(os.Stdout, msg)
382394
return nil
383395
}
396+
397+
func runSetLogSQL(c *cli.Context) error {
398+
ctx, cancel := installSignals()
399+
defer cancel()
400+
setup("manager", c.Bool("debug"))
401+
402+
statusCode, msg := private.SetLogSQL(ctx, !c.Bool("off"))
403+
switch statusCode {
404+
case http.StatusInternalServerError:
405+
return fail("InternalServerError", msg)
406+
}
407+
408+
fmt.Fprintln(os.Stdout, msg)
409+
return nil
410+
}

custom/conf/app.example.ini

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,6 @@ ENABLE = true
475475
;; Maximum length of oauth2 token/cookie stored on server
476476
;MAX_TOKEN_LENGTH = 32767
477477

478-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
479-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
480-
[U2F]
481-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
482-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
483-
;;
484-
;; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED
485-
;; Two Factor authentication with security keys
486-
;; https://developers.yubico.com/U2F/App_ID.html
487-
;;
488-
;; DEPRECATED - this only applies to previously registered security keys using the U2F standard
489-
APP_ID = ; e.g. http://localhost:3000/
490-
491-
492478
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
493479
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
494480
[log]
@@ -1097,6 +1083,9 @@ PATH =
10971083
;; Number of items that are displayed in home feed
10981084
;FEED_PAGING_NUM = 20
10991085
;;
1086+
;; Number of items that are displayed in a single subsitemap
1087+
;SITEMAP_PAGING_NUM = 20
1088+
;;
11001089
;; Number of maximum commits displayed in commit graph.
11011090
;GRAPH_MAX_COMMIT_NUM = 100
11021091
;;
@@ -2124,7 +2113,7 @@ PATH =
21242113
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21252114
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21262115
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
2127-
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
2116+
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
21282117
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
21292118

21302119
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
174174
- `MEMBERS_PAGING_NUM`: **20**: Number of members that are shown in organization members.
175175
- `FEED_MAX_COMMIT_NUM`: **5**: Number of maximum commits shown in one activity feed.
176176
- `FEED_PAGING_NUM`: **20**: Number of items that are displayed in home feed.
177+
- `SITEMAP_PAGING_NUM`: **20**: Number of items that are displayed in a single subsitemap.
177178
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
178179
- `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment.
179180
- `DEFAULT_THEME`: **auto**: \[auto, gitea, arc-green\]: Set the default theme for the Gitea install.
@@ -998,13 +999,10 @@ Default templates for project boards:
998999

9991000
## i18n (`i18n`)
10001001

1001-
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
1002+
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
10021003
List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list.
10031004
- `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales
10041005

1005-
## U2F (`U2F`) **DEPRECATED**
1006-
- `APP_ID`: **`ROOT_URL`**: Declares the facet of the application which is used for authentication of previously registered U2F keys. Requires HTTPS.
1007-
10081006
## Markup (`markup`)
10091007

10101008
- `MERMAID_MAX_SOURCE_CHARACTERS`: **5000**: Set the maximum size of a Mermaid source. (Set to -1 to disable)

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ The list of themes a user can choose from can be configured with the `THEMES` va
335335

336336
To make a custom theme available to all users:
337337

338-
1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-<theme-name>.css`.
339-
The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
338+
1. Add a CSS file to `$GITEA_CUSTOM/public/css/theme-<theme-name>.css`.
339+
The value of `$GITEA_CUSTOM` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
340340
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
341341

342342
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).

docs/content/doc/developers/oauth2-provider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ To use the Authorization Code Grant as a third party application it is required
4141

4242
## Scopes
4343

44-
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and his/her organizations.
44+
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and their organizations.
4545

4646
## Example
4747

4848
**Note:** This example does not use PKCE.
4949

50-
1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources:
50+
1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources:
5151

5252
```curl
5353
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE

docs/content/doc/developers/oauth2-provider.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意
4646
**備註:** 此範例未使用 PKCE。
4747

4848
1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源:
49-
<!-- 1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources: -->
49+
<!-- 1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources: -->
5050

5151
```curl
5252
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE

0 commit comments

Comments
 (0)