wxiaoguang
6f8ab6aaaf
Fix URLJoin, markup render link reoslving, sign-in/up/linkaccount page common data ( #36861 )
...
The logic of "URLJoin" is unclear and it is often abused.
Also:
* Correct the `resolveLinkRelative` behavior
* Fix missing "PathEscape" in `ToTag`
* Fix more FIXMEs, and add new FIXMEs for newly found problems
* Refactor "auth page common template data"
2026-03-08 15:57:37 +00:00
Tyrone Yeh
79ae9ea97b
fix(repo): unify DEFAULT_SHOW_FULL_NAME output in templates and dropdown ( #36597 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
The design of DefaultShowFullName has some problems, which make the UI
inconsistent, see the new comment in code
This PR does a clean up for various legacy problems, and clarify some
"user name display" behaviors.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-03-04 21:23:17 +08:00
Zettat123
5b8c8e724f
Add never option to PUBLIC_URL_DETECTION configuration ( #36785 )
...
Follow up #34250
Docs: https://gitea.com/gitea/docs/pulls/353
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-03-01 18:33:47 +00:00
Nicolas
dae2d32186
Correct spelling ( #36783 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
cron-flake-updater / nix-flake-update (push) Has been cancelled
I was testing typos-cli and fixed some misspelled wording here.
All changes are internal — no public API fields, database columns,
locale keys, or migration names are affected.
2026-02-28 11:23:20 -08:00
wxiaoguang
ae2b19849d
Use "Enable Gravatar" but not "Disable" ( #36771 )
...
* Fix #35685
* Fix #35627
* Fix #31112
Introduce "fipped" config value type, remove unused setting variables.
Make DisableGravatar=true by defult, remove useless config options from
the "Install" page.
The legacy config options are still kept because they are still the
fallback values for the system config options.
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
2026-02-27 16:39:26 +00:00
Nicolas
26d83c932a
Instance-wide (global) info banner and maintenance mode ( #36571 )
...
The banner allows site operators to communicate important announcements
(e.g., maintenance windows, policy updates, service notices) directly
within the UI.
The maintenance mode only allows admin to access the web UI.
* Fix #2345
* Fix #9618
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-02-26 23:16:11 +08:00
wxiaoguang
75efc51e98
Fix incorrect setting loading order ( #36735 )
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
2026-02-24 23:46:08 +08:00
silverwind
5f8e19fcef
Move X_FRAME_OPTIONS setting from cors to security section ( #30256 )
...
## Summary
- Move `cors.X_FRAME_OPTIONS` to `security.X_FRAME_OPTIONS` (old
location still works with a deprecation warning)
- Support `"unset"` as a special value to remove the `X-Frame-Options`
header entirely
- Remove `X-Frame-Options` header from API responses (only set for
web/HTML responses)
## Migration
If you had customized `cors.X_FRAME_OPTIONS`, move it to the
`[security]` section. The old location is deprecated and will be removed
in a future release.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-02-22 20:26:46 +00:00
TheFox0x7
eb59b1a24a
various fixes ( #36697 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
fixes bad address concat causing malformed address
Introduces new config options to for release attachments and number of
files to avoid sharing limits for PR/issue attachments and release ones
Fixes: https://github.com/go-gitea/gitea/issues/31638
Fixes: https://github.com/go-gitea/gitea/issues/35812
Doc update: https://gitea.com/gitea/docs/pulls/348
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-02-22 08:01:43 +01:00
Lunny Xiao
ed587ca71b
Add some validation on values provided to USER_DISABLED_FEATURES and EXTERNAL_USER_DISABLED_FEATURES ( #36688 )
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
2026-02-21 00:56:43 +00:00
Lunny Xiao
86d102494b
Remove unused functions ( #36672 )
...
Follow #36643
2026-02-20 22:49:02 +00:00
silverwind
5e9b9b33d1
Clean up Makefile, tests and legacy code ( #36638 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
This simplifies the Makefile by removing the whole-file wrapping that
creates a tempdir introduced by
https://github.com/go-gitea/gitea/pull/11126 . REPO_TEST_DIR is removed
as well.
Also clean up a lot of legacy code: unnecessary XSS test, incorrect test
env init, unused "_old_uid" hack, etc
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-02-19 01:23:32 +00:00
silverwind
147bdfce0d
Add actions.WORKFLOW_DIRS setting ( #36619 )
...
Fixes: https://github.com/go-gitea/gitea/issues/36612
This new setting controls which workflow directories are searched. The
default value matches the previous hardcoded behaviour.
This allows users for example to exclude `.github/workflows` from being
picked up by Actions in mirrored repositories by setting `WORKFLOW_DIRS
= .gitea/workflows`.
Signed-off-by: silverwind <me@silverwind.io >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-19 01:31:01 +01:00
Copilot
8feabe4160
Add FOLDER_ICON_THEME configuration option ( #36496 )
...
Fixes: https://github.com/go-gitea/gitea/issues/35182
Signed-off-by: silverwind <me@silverwind.io >
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com >
Co-authored-by: silverwind <me@silverwind.io >
2026-01-30 20:48:56 +00:00
silverwind
2d1306291b
Use reserved .test TLD for unit tests ( #36498 )
...
`smtp.mydomain.test` is a real domain that resolves to something and
which is being connected to while running tests. Instead, use
[.test](https://en.wikipedia.org/wiki/.test ) which is guaranteed to
never be registered on the internet, so all connections to it will fail
with NXDOMAIN dns error.
2026-01-30 19:42:32 +00:00
wxiaoguang
07ada3666b
chore: add comments for "api/healthz", clean up test env ( #36481 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
GITEA_UNIT_TESTS_LOG_SQL is renamed to GITEA_TEST_LOG_SQL
2026-01-30 10:23:38 +08:00
wxiaoguang
4c8f6dfa4e
Support rendering OpenAPI spec ( #36449 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
Fix #20852
2026-01-26 10:34:38 +08:00
luo jiyin
6a5f9e12f9
Fix typos: unknow -> unknown, pktLineTypeUnknow -> pktLineTypeUnknown ( #36419 )
2026-01-22 01:17:06 +00:00
wxiaoguang
9ea91e036f
Refactor git command context & pipeline ( #36406 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
Less and simpler code, fewer bugs
2026-01-21 01:35:14 +00:00
silverwind
42d294941c
Replace CSRF cookie with CrossOriginProtection ( #36183 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection )
which relies purely on HTTP headers.
Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107
TODOs:
- [x] Fix tests
- [ ] Ideally add tests to validates the protection
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-12-25 12:33:34 +02:00
silverwind
1e22bd712f
Bump golangci-lint to 2.7.2, enable modernize stringsbuilder ( #36180 )
...
Fixes were done automatically by `make lint-go-fix`. These modernize
fixes are very readable.
Co-authored-by: Giteabot <teabot@gitea.io >
2025-12-17 20:50:53 +00:00
silverwind
852bf5e2a5
Add git.DIFF_RENAME_SIMILARITY_THRESHOLD option ( #36164 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Make the threshold value passed to `git diff --find-renames` configurable
2025-12-17 10:02:32 +00:00
Lunny Xiao
29057ea55f
Fix bug when viewing the commit diff page with non-ANSI files ( #36149 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Fix #35504
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-12-13 21:54:03 +08:00
wxiaoguang
f25409fab8
Make Golang correctly delete temp files during uploading ( #36128 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Fix #36127
2025-12-11 19:59:42 +01:00
Ger Schinkel
d83a071db9
Changed a small typo in an error message and code comments. ( #36117 )
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
2025-12-09 10:14:05 -05:00
silverwind
b49dd8e32f
update golangci-lint to v2.7.0 ( #36079 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
- Update and autofix most issues
- Corrected variable names to `cutOk`
- Impossible condition in `services/migrations/onedev_test.go` removed
- `modules/setting/config_env.go:128:3` looks like a false-positive,
added nolint
2025-12-04 09:06:44 +00:00
wxiaoguang
e31f224ad2
Make OAuth2 issuer configurable ( #35915 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
The new (correct) behavior breaks the old (incorrect) logins.
Add a config option to support legacy "issuer".
Fix #35830
2025-11-10 23:45:01 +08:00
wxiaoguang
a0f492d9f4
Make ACME email optional ( #35849 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Fix a regression from #33668
Fix #35847
2025-11-04 18:17:50 +00:00
wxiaoguang
6b5563c54a
Support selecting theme on the footer ( #35741 )
...
Fixes: https://github.com/go-gitea/gitea/pull/27576
2025-10-28 18:25:00 +08:00
wxiaoguang
cb72c901b3
Intorduce "config edit-ini" sub command to help maintaining INI config file ( #35735 )
...
Ref: #32669 . Helps addressing
https://gitea.com/gitea/helm-chart/issues/356 .
2025-10-25 10:54:55 +08:00
silverwind
cab35ff17a
Update dependencies ( #35733 )
...
- Update all JS, Python and Makefile dependencies
- Fixed two new go lint issues
- Tested the affected JS dependencies.
2025-10-23 08:35:48 +00:00
wxiaoguang
522c466e24
Make external iframe render work ( #35730 )
...
Fix #35729 , #17635 , #21098
2025-10-23 08:01:38 +00:00
wxiaoguang
195fc715ff
Fix external render ( #35727 )
...
Fix #35725
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
2025-10-22 23:41:38 +00:00
a1012112796
a4e23b81d3
fix attachment file size limit in server backend ( #35519 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
fix #35512
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-10-21 15:07:11 +00:00
wxiaoguang
b2ee5be52e
Refactor legacy code ( #35708 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
And by the way, remove the legacy TODO, split large functions into small
ones, and add more tests
2025-10-20 11:43:08 -07:00
wxiaoguang
66ee8f3553
Avoid emoji mismatch and allow to only enable chosen emojis ( #35692 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Fix #23635
2025-10-19 13:06:45 -07:00
wxiaoguang
71360a94cb
Address some CodeQL security concerns ( #35572 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
Although there is no real security problem
2025-10-04 01:21:26 +08:00
ChristopherHX
9a0ec53ee3
Stream repo zip/tar.gz/bundle achives by default ( #35487 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
Initial implementation of linked proposal.
* Closes #29942
* Fix #34003
* Fix #30443
---------
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-09-19 11:51:21 +08:00
wxiaoguang
4fe1066a17
Replace gobwas/glob package ( #35478 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled
https://github.com/gobwas/glob is unmaintained and has bugs.
2025-09-13 18:01:00 +00:00
Ilya Nurullin
e844a41248
Use configurable remote name for git commands ( #35172 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
Closes #19403 , and makes it possible to use any remote name in code
snippets for an empty repository and pull request.
This change is very helpful to me, because I always use different name
for my gitea remote.
Uses setting config module to store the value. Default is `origin` for
backward compatibility.
### Screenshots
<details>
<summary>Empty repo</summary>
<img width="791" height="398" alt="image"
src="https://github.com/user-attachments/assets/7214053d-a8dd-4e77-8c9d-78936d9859e0 "
/>
</details>
<details>
<summary>Pull Request</summary>
<img width="591" height="452" alt="image"
src="https://github.com/user-attachments/assets/ebc3d25c-5d6d-481d-819d-9706af3c5594 "
/>
</details>
<details>
<summary>Settings page</summary>
<img width="1438" height="839" alt="image"
src="https://github.com/user-attachments/assets/d92bfa2c-7adc-4efe-95fa-0c55ad13b3f5 "
/>
</details>
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-08-21 10:14:35 -07:00
Lunny Xiao
90a48e96c7
Fix a bug where lfs gc never worked. ( #35198 )
...
Fix #31113
After #22385 introduced LFS GC, it never worked due to a bug in the INI
library: fields in structs embedded more than one level deep are not
populated from the INI file.
This PR fixes the issue by replacing the multi-level embedded struct
with a single-level struct for parsing the cron.gc_lfs configuration.
Added a new test for retrieving cron settings to demonstrate the bug in
the INI package.
2025-08-12 05:38:17 +00:00
Tim Biermann
345045888d
modules/setting/actions.go: fixed typo: ì->i ( #35253 )
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
2025-08-11 22:57:44 -04:00
wxiaoguang
a5a3d9b101
Refactor OpenIDConnect to support SSH/FullName sync ( #34978 )
...
* Fix #26585
* Fix #28327
* Fix #34932
2025-07-10 18:35:59 +00:00
wxiaoguang
211135b4bb
Fix various problems ( #35012 )
...
* Fix #35011
* Fix incorrect log message for "Protocol"
* Remove unnecessary styles, fix "comment-header" wrap, fix label height
2025-07-09 16:46:51 +00:00
silverwind
95a935aca0
Enable gocritic equalFold and fix issues ( #34952 )
...
Continuation of https://github.com/go-gitea/gitea/pull/34678 .
---------
Signed-off-by: silverwind <me@silverwind.io >
2025-07-06 16:53:34 +00:00
TheFox0x7
aa9d86745a
enforce explanation for necessary nolints and fix bugs ( #34883 )
...
Follows up https://github.com/go-gitea/gitea/pull/34851
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-06-27 21:48:03 +08:00
silverwind
46a1d52235
Fix remaining issues after gopls modernize formatting ( #34771 )
...
Followup https://github.com/go-gitea/gitea/pull/34751 , fix all remaining
marked issues.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2025-06-18 11:37:49 -07:00
silverwind
1f35435b81
Run gopls modernize on codebase ( #34751 )
...
Recent modernize fixes:
https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
2025-06-18 01:48:09 +00:00
ChristopherHX
c9505a26b9
Improve instance wide ssh commit signing ( #34341 )
...
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
* Signed SSH commits can look in the UI like on GitHub, just like gpg keys today in Gitea
* SSH format can be added in gitea config
* SSH Signing worked before with DEFAULT_TRUST_MODEL=committer
`TRUSTED_SSH_KEYS` can be a list of additional ssh public key contents
to trust for every user of this instance
Closes #34329
Related #31392
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-06-11 10:32:55 +00:00
wxiaoguang
92e7e98c56
Update x/crypto package and make builtin SSH use default parameters ( #34667 )
2025-06-09 19:51:02 +00:00