0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-24 13:06:58 +01:00

20244 Commits

Author SHA1 Message Date
Excellencedev
942ea3d021 ui fix 2026-01-03 13:45:46 +01:00
Excellencedev
13660f202d cleanup 2026-01-03 13:39:01 +01:00
Excellencedev
9faf677652
Merge branch 'main' into fix-24635 2026-01-03 10:32:01 +01:00
Excellencedev
3e95499bcf green up ci 2026-01-03 10:31:44 +01:00
wxiaoguang
b79dbfa990
Fix link/origin referrer and login redirect (#36279)
Fix #35998

1. Fix `<a rel>` :
    * "_blank" already means "noopener"
* "noreferrer" is already provided by page's `<meta name="referrer">`
2. Fix "redirect_to" mechisam
* Use "referer" header to determine the redirect link for a successful
login
3. Simplify code and merge duplicate logic
2026-01-03 11:43:04 +08:00
wxiaoguang
6fb3547417
Always honor user's choice for "delete branch after merge" (#36281)
Fix #36280
2026-01-03 10:36:21 +08:00
Excellencedev
be52d4a338 ... 2026-01-02 10:42:18 +01:00
Excellencedev
285f366f22 ... 2026-01-02 10:12:47 +01:00
Excellencedev
91f8298828 comile errors 2026-01-02 09:42:39 +01:00
Excellencedev
a944be1bf2 improve test 2026-01-02 09:28:56 +01:00
luo jiyin
d2baa8103f
refactor(pprof): use explicit mux instead of DefaultServeMux (#36276)
- Replace blank import of `net/http/pprof` with explicit import
- Create dedicated `http.ServeMux` for pprof server
- Register pprof handlers explicitly

---------

Signed-off-by: luojiyin <luojiyin@hotmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-02 08:06:06 +00:00
Excellencedev
cdbed1d80f
Merge branch 'main' into fix-24635 2026-01-02 08:42:22 +01:00
Lunny Xiao
8373f7deb3
improve the compare page (#36261)
- The compare page head title should be `compare` but not `new pull
request`.
- Use `UnstableGuessRefByShortName` instead of duplicated functions
calls.
- Direct-compare, tags, commits compare will not display `New Pull
Request` button any more.

The new screenshot
<img width="1459" height="391" alt="image"
src="https://github.com/user-attachments/assets/64e9b070-9c0b-41d1-b4b8-233b96270e1b"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 10:32:19 -08:00
Excellencedev
3af786ccee
Merge branch 'main' into fix-24635 2026-01-01 06:39:03 +01:00
luo jiyin
98981eb749
mailer: pass request context to generateAdditionalHeadersForIssue (#36274)
Fixes #36273

Use the caller-provided context when building X-Gitea-Issue-Link,
instead of `context.TODO()`.
2026-01-01 04:28:25 +00:00
Max P.
91d871611e
feat(debian): use explicit, stronger defaults for newly generated repo signing keys (#36236)
Make Debian repository signing key generation use explicit stronger defaults
and embed the creation time in the OpenPGP comment for newly created keys.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 02:36:14 +00:00
wxiaoguang
094104bc91
Make "commit statuses" API accept slashes in "ref" (#36264)
Fix #36253

Support slashes in `{ref}` (follow GitHub's behavior)
2026-01-01 09:56:07 +08:00
Excellencedev
f3b14570f2 Feedback 2025-12-31 19:14:10 +01:00
Excellencedev
2e7bd47be6 chore: fix ci 2025-12-31 06:00:05 +01:00
Excellencedev
1ff75aa822 Implement Workflow Level Permissions 2025-12-31 05:11:28 +01:00
Excellencedev
f367039e78 make lint fixes 2025-12-30 11:09:41 +01:00
Excellencedev
dcfe19c11b fmt 2025-12-30 06:13:07 +01:00
Excellencedev
4a9a54e2df ... 2025-12-30 05:47:22 +01:00
Excellencedev
de0d8da7b6 Make sure pre-receive hook can properly check Actions token permissions based on your repository configuration 2025-12-30 05:18:54 +01:00
Excellencedev
efb93b5da1 Fixes 2025-12-30 04:38:04 +01:00
Excellencedev
4fb498987d
Merge branch 'main' into fix-24635 2025-12-30 03:55:07 +01:00
Lunny Xiao
1771569300
Some refactor for repo path (#36251)
- Use `gitrepo.IsRepositoryExist` instead of `util.IsExit` or
`util.IsDir`
- Use `gitrepo.OpenRepository` instead of `git.OpenRepository`
- Use `gitrepo.DeleteRepository` instead of `util.RemoveAll`
- Use `gitrepo.RenameRepository` instead of `util.Rename`
2025-12-29 18:49:54 +00:00
Lunny Xiao
0ad94dfc70
Move catfile batch to a sub package of git module (#36232) 2025-12-29 10:19:42 -08:00
alphazeba
d0cb198c89
fix: prevent 100% width radio buttons (#36262)
as part of [Remove fomantic form
module](eddf875992 (diff-c34b74004deb63fb4f8a8549ef9d822b9839db0b69ae2c0cdacc05ce3d5d5682))
radio buttons get caught in crossfire and recieve `width: 100%` this is
particularly noticeable on the `user/settings/applications` page which
has many radio buttons.

This continues using an opt out `input:not([type="checkbox"],
[type="radio"])` to prevent this.

Signed-off-by: alphazeba <33792307+alphazeba@users.noreply.github.com>
2025-12-29 09:51:10 +02:00
GiteaBot
85dd16b3fc [skip ci] Updated translations via Crowdin 2025-12-29 00:43:22 +00:00
Lunny Xiao
c7b3cdf7b1
Use gitrepo's push function (#36245)
extract from #36186
2025-12-28 13:24:28 +02:00
Gregorius Bima Kharisma Wicaksana
83527d3f8a
Support closing keywords with URL references (#36221)
## Summary

This PR adds support for closing keywords (`closes`, `fixes`, `reopens`,
etc.) with full URL references in markdown links.

**Before:**
- `closes #123`  works
- `closes org/repo#123`  works  
- `Closes [this issue](https://gitea.io/user/repo/issues/123)`  didn't
work
- `Fixes [#456](https://gitea.io/org/project/issues/456)`  didn't work

**After:**
All of the above now work correctly.

## Problem

When users reference issues using full URLs in markdown links (e.g.,
`Closes [this issue](https://gitea.io/user/repo/issues/123)`), the
closing keywords were not detected. This was because the URL processing
code explicitly stated:

```go
// Note: closing/reopening keywords not supported with URLs
```

Both methods of writing the reference render the same in the UI, so
users expected the closing keywords to behave the same.

## Solution

The fix works by:
1. Passing the original (unstripped) content to
`findAllIssueReferencesBytes`
2. When processing URL links from markdown, finding the URL position in
the original content
3. For markdown links `[text](url)`, finding the opening bracket `[`
position
4. Using that position to detect closing keywords before the link

## Testing

Added test cases for:
- `Closes [this issue](url)` - single URL with closing keyword
- `This fixes [#456](url)` - keyword in middle of text
- `Reopens [PR](url)` - reopen keyword with pull request URL
- Multiple URLs where only one has a closing keyword

All existing tests continue to pass.

Fixes #27549
2025-12-27 09:05:24 -08:00
Ivan Tkatchev
19e1997ee2
Add an option to automatically verify SSH keys from LDAP (#35927)
This pull request adds an option to automatically verify SSH keys from
LDAP authentication sources.

This allows a correct authentication and verification workflow for
LDAP-enabled organizations; under normal circumstances SSH keys in LDAP
are not managed by users manually.
2025-12-27 12:33:08 +00:00
Lunny Xiao
00cc84e37c
remove nolint (#36252) 2025-12-26 22:55:30 -08:00
Excellencedev
f9f24dd466 Make all CI green again 2025-12-26 13:15:32 +01:00
Excellencedev
ae43a09aa8 ... 2025-12-26 12:49:27 +01:00
Excellencedev
621c0e2b50 ... 2025-12-26 12:13:12 +01:00
Excellencedev
640004f70f test fix 2025-12-26 12:05:51 +01:00
Excellencedev
26e47a58ef .... 2025-12-26 11:23:32 +01:00
Excellencedev
c7d20802af LOGS 2025-12-26 09:54:36 +01:00
Excellencedev
4ccb766bf2 Re-implement changes for feedback 2025-12-26 09:18:59 +01:00
Excellencedev
7df7f72a71
Merge branch 'main' into fix-24635
Signed-off-by: Excellencedev <ademiluyisuccessandexcellence@gmail.com>
2025-12-26 08:23:33 +01:00
sollyu
64fcf847ce
Use the requested host for LFS links (#36242)
Use the dynamically parsed host in the request for LFS links, but not
use the hard-coded AppURL.

Make LFS server support multi-domain or run Gitea behind a reverse-proxy
with different ROOT_URL.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-26 04:48:20 +00:00
Lunny Xiao
ff3d68b98a
Fix panic when get editor config file (#36241)
Fix #36239
2025-12-25 19:26:23 -08:00
Lunny Xiao
776e406363
Refactor compare router param parse (#36105)
---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 17:51:30 -08:00
GiteaBot
fbbed8c4c4 [skip ci] Updated translations via Crowdin 2025-12-25 21:37:43 +00:00
Lunny Xiao
324dcf6f64
Use flatten translation keys (#36225)
Crowdin does not remove empty lines in nested JSON translation files.
Therefore, we use flattened translation keys instead. We have also
updated the key-loading logic to ensure that empty values are not
applied during translation.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-12-25 12:51:33 -08:00
silverwind
42d294941c
Replace CSRF cookie with CrossOriginProtection (#36183)
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
Excellencedev
e52ff98bcf Fix updated test 2025-12-24 13:30:36 +01:00
Excellencedev
973de056e8 review comment 2025-12-24 13:02:07 +01:00