Commit Graph
31 Commits
Author SHA1 Message Date
wxiaoguang ae1dc9725f Improve pprof doc (#20463) 2022-07-24 01:33:55 +08:00
wxiaoguang 8f9b84a5ec Add tests for the host checking logic, clarify the behaviors (#20328)
Before, the combination of AllowedDomains/BlockedDomains/AllowLocalNetworks is confusing.

This PR adds tests for the logic, clarify the behaviors.
2022-07-13 09:07:16 +08:00
559cee2ea1 Use git.HOME_PATH for Git HOME directory (#20114)
* Add git.HOME_PATH

* add legacy file check

* Apply suggestions from code review

Co-authored-by: zeripath <[email protected]>

* pass env GNUPGHOME to git command, move the existing .gitconfig to new home, make the fix for 1.17rc more clear.

* set git.HOME_PATH for docker images to default HOME

* Revert "set git.HOME_PATH for docker images to default HOME"

This reverts commit f120101ddc267cef74e4f4b92c783d5fc8e275a1.

* force Gitea to use a stable GNUPGHOME directory

* extra check to ensure only process dir or symlink for legacy files

* refactor variable name

* The legacy dir check (for 1.17-rc1) could be removed with 1.18 release, since users should have upgraded from 1.17-rc to 1.17-stable

* Update modules/git/git.go

Co-authored-by: Steven Kriegler <[email protected]>

* remove initFixGitHome117rc

* Update git.go

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

Co-authored-by: zeripath <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: Steven Kriegler <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2022-07-08 16:09:07 +08:00
43624af9ef Improve log document (#20097)
* Improve log document

* Update docs/content/doc/help/seek-help.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/help/seek-help.en-us.md

Co-authored-by: Gusted <[email protected]>

* Use different log names to avoid conflicts

* Update seek-help.en-us.md

Co-authored-by: delvh <[email protected]>
Co-authored-by: Gusted <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2022-06-24 10:56:46 +08:00
wxiaoguang ac23cc4591 Update document to clarify that ALLOWED_DOMAINS/BLOCKED_DOMAINS support wildcard (#20016) 2022-06-18 15:23:06 -04:00
53f157179a Remove legacy git code (ver < 2.0), fine tune markup tests (#19930)
* clean git support for ver < 2.0

* fine tune tests for markup (which requires git module)

* remove unnecessary comments

* try to fix tests

* try test again

* use const for GitVersionRequired instead of var

* try to fix integration test

* Refactor CheckAttributeReader to make a *git.Repository version

* update document for commit signing with Gitea's internal gitconfig

* update document for commit signing with Gitea's internal gitconfig

Co-authored-by: Andrew Thornton <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2022-06-16 23:47:44 +08:00
5d2eb5b846 Use Golang 1.18 for Gitea 1.17 release (#19918)
Use Golang 1.18 (as minimal requirement) for Gitea 1.17 release, make sure the Golang version is still actively supported during Gitea 1.17 lifecycle.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
2022-06-10 05:34:41 +02:00
wxiaoguangandLunny Xiao f2e295842c Update frontend guideline (#19901)
* update frontend guideline

* "Native" => "Vanilla JS", fix typo comma.

Co-authored-by: Lunny Xiao <[email protected]>
2022-06-06 10:44:20 -04:00
wxiaoguang 7a0ae698e0 update documents (#19868) 2022-06-02 00:22:42 -04:00
wxiaoguang 095601b249 Update document to use FHS /usr/local/bin/gitea instead of /app/... for Docker (#19794)
* Update document to use FHS `/usr/local/bin/gitea` instead of `/app/...` in Docker

* Update docs/content/doc/installation/with-docker.zh-cn.md
2022-05-24 14:57:15 +08:00
wxiaoguang 3356bcaf0c Remove RequireHighlightJS field, update plantuml example. (#19615) 2022-05-05 10:53:38 +03:00
wxiaoguang 02bccf285b Upgrade required git version to 2.0 (#19577)
* Upgrade required git version to 2.0

* update document
2022-05-02 20:30:24 +08:00
wxiaoguang 48799143cc Use "main" as default branch name (#19354)
* Use "main" as default branch name

* fix test code
2022-04-08 23:26:48 -05:00
wxiaoguang bfb1048a99 Remove legacy unmaintained packages, refactor to support change default locale (#19308)
Remove two unmaintained vendor packages `i18n` and `paginater`. Changes:
* Rewrite `i18n` package with a more clear fallback mechanism. Fix an unstable `Tr` behavior, add more tests.
* Refactor the legacy `Paginater` to `Paginator`, test cases are kept unchanged.

Trivial enhancement (no breaking for end users):
* Use the first locale in LANGS setting option as the default, add a log to prevent from surprising users.
2022-04-03 17:46:48 +08:00
wxiaoguang a71742308d Refactor Router Logger (#17308)
Make router logger more friendly, show the related function name/file/line.

[BREAKING]
This PR substantially changes the logging format of the router logger. If you use this logging for monitoring e.g. fail2ban you will need to update this to match the new format.
2022-01-20 19:41:25 +08:00
wxiaoguang 87839792e0 Revert "Prevent possible XSS when using jQuery (#18289)" (#18293)
This reverts commit 661d3d28e97bb49bef075c0314edad5879148aaa.
2022-01-16 11:19:26 +00:00
wxiaoguang 5464f51b37 Fix documents for development and bug report (#18249) 2022-01-13 10:58:46 +08:00
wxiaoguang 1298de1e08 Improve document for developers: Windows CGO, unit test option (#18140) 2021-12-31 22:21:11 +08:00
wxiaoguang d2d95adbc6 Fix documents for Windows development (#18109)
* Fix documents for Windows development
2021-12-26 23:27:18 +08:00
50823c34c7 Refactor install page (db type) (#17919)
* Refactor install page (db type)

* set correct default DB HOST for different DB TYPE
* remove legacy TiDB from documents
* unify the usage of DB TYPE, in code we only use "mysql". "MySQL" is only shown to users for friendly name.

* Gitea can use TiDB via MySQL protocol

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2021-12-07 13:44:08 +08:00
wxiaoguang ba33107d0d Improve seek-help documents (#17895)
* Add pprof information to seek-help documents 
* Improve zh-cn and zh-tw documents
2021-12-03 21:04:32 +08:00
wxiaoguang 85958c5ac7 Fix project board bug and improve documents (#17753)
* the project board was broken, this PR fixes it, and refactor the code, and we prevent the uncategorized column from being dragged.
* improve the frontend guideline (as discussed in https://github.com/go-gitea/gitea/pull/17699)
2021-11-22 19:40:17 +08:00
wxiaoguang 3f187b5151 Use hostmatcher to replace matchlist, improve security (#17605)
Use hostmacher to replace matchlist.

And we introduce a better DialContext to do a full host/IP check, otherwise the attackers can still bypass the allow/block list by a 302 redirection.
2021-11-20 17:34:05 +08:00
wxiaoguang 67bfafdb2f Fix some incorrect async functions, improve frontend document. (#17597) 2021-11-12 20:37:45 +08:00
wxiaoguang 2862371b0e Fix documents for ALLOWED_HOST_LIST, its default value differs between 1.15 and 1.16 (#17530)
* fix documents for ALLOWED_HOST_LIST, its default value differs between 1.15 and 1.16
2021-11-08 11:25:41 +08:00
wxiaoguang 2f2718b799 Only allow webhook to send requests to allowed hosts (#17482) 2021-11-01 16:39:52 +08:00
92cf815981 Split index.js to separate files (#17315)
* split `index.js` to separate files

* tune clipboard

* fix promise

* fix document

* remove intermediate empty file

* fix async event listener

* use `export function` instead of `export {}`, add more comments

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-10-17 01:28:04 +08:00
wxiaoguangandtechknowlogick 1cc5dacdea Update documents for Gitea behind reverse proxy. Fix some small bugs (some URLs are generated without sub-path) (#17320)
* Apache `ProxyPassReverse` only works for Location, Content-Location and URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set `ProxyPassReverse`.

* fix url param

* use AppSubURL instead of AppURL in api/v1

Co-authored-by: techknowlogick <[email protected]>
2021-10-15 23:34:07 -04:00
c829f4430d Frontend refactor: move Vue related code from index.js to components dir, and remove unused codes. (#17301)
* frontend refactor

* Apply suggestions from code review

Co-authored-by: delvh <[email protected]>

* Update templates/base/head.tmpl

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/developers/guidelines-frontend.md

Co-authored-by: Lunny Xiao <[email protected]>

* fix typo

* fix typo

* refactor PageData to pageData

* Apply suggestions from code review

Co-authored-by: delvh <[email protected]>

* Simply for the visual difference.

Co-authored-by: delvh <[email protected]>

* Revert "Apply suggestions from code review"

This reverts commit 4d78ad9b0e96ca180e0823de17659a2e0814c099.

Co-authored-by: delvh <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-10-15 10:35:26 +08:00
4c275fd2cf doc: Upgrade from an old Gitea (#16918)
* doc: Upgrade from an old Gitea

* update backup steps

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>

* update backup tips

* update table header

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: silverwind <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: silverwind <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: techknowlogick <[email protected]>

* Update docs/content/doc/upgrade/from-gitea.en-us.md

Co-authored-by: techknowlogick <[email protected]>

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

* Update from-gitea.en-us.md

Co-authored-by: delvh <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2021-09-09 14:13:21 -04:00
wxiaoguangandzeripath c0661259bb Add GoLand configuration in hacking on gitea (#16843)
Co-authored-by: zeripath <[email protected]>
2021-08-28 23:25:08 -04:00