Commit Graph
20231 Commits
Author SHA1 Message Date
ExcellencedevandGitHub 3af786ccee Merge branch 'main' into fix-24635 2026-01-01 06:39:03 +01:00
luo jiyinandGitHub 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
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
wxiaoguangandGitHub 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
ExcellencedevandGitHub 4fb498987d Merge branch 'main' into fix-24635 2025-12-30 03:55:07 +01:00
Lunny XiaoandGitHub 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 XiaoandGitHub 0ad94dfc70 Move catfile batch to a sub package of git module (#36232) 2025-12-29 10:19:42 -08:00
alphazebaandGitHub d0cb198c89 fix: prevent 100% width radio buttons (#36262)
as part of [Remove fomantic form
module](https://github.com/go-gitea/gitea/commit/eddf8759926911c465b249de5f6d68c052a539e0#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 XiaoandGitHub c7b3cdf7b1 Use gitrepo's push function (#36245)
extract from #36186
2025-12-28 13:24:28 +02:00
Gregorius Bima Kharisma WicaksanaandGitHub 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 TkatchevandGitHub 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 XiaoandGitHub 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
ExcellencedevandGitHub 7df7f72a71 Merge branch 'main' into fix-24635
Signed-off-by: Excellencedev <ademiluyisuccessandexcellence@gmail.com>
2025-12-26 08:23:33 +01:00
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 XiaoandGitHub ff3d68b98a Fix panic when get editor config file (#36241)
Fix #36239
2025-12-25 19:26:23 -08:00
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
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
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
Excellencedev ebf7e2ea8c fix test 2025-12-24 06:26:31 +01:00
Excellencedev 43279bfb8b Use correct authentication 2025-12-24 05:57:51 +01:00
Excellencedev 9ada493d72 Add cross repo package access test 2025-12-24 05:29:27 +01:00
Excellencedev 9bd8b8109d Review comment fixes 2025-12-24 02:49:37 +01:00
ExcellencedevandGitHub 50f300b421 Merge branch 'main' into fix-24635 2025-12-23 19:04:14 +01:00
eddf875992 Remove fomantic form module (#36222)
- Replace fomantic form CSS with custom module
- Moved code in `form.css` to `modules/form.css`, removed around 70% of
the previous module.
- Moved captcha styles previously in `form.css` to its own file.

There is probably more unused CSS, like form error state colors which to
my knowledge is not used anywhere, but I'm not sure about that one so I
kept it.

One notable change is the removal of `type` combinator here, which
lowers the selector specificity and I noticed one issue where selector
`.ui.search > .prompt` was winning, so I added a workaround for that
until the `search` module can be removed as well.

```css
.ui.form .fields.error .field input:not([type])
.ui.form .fields.error .field input[type="date"]
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-23 18:21:47 +01:00
Max P.andGitHub 957151937f Fix panic in blame view when a file has only a single commit (#36230)
This PR fixes a panic in the repository blame view that occurs when
rendering files whose blame history consists of only a single commit.
2025-12-23 14:26:29 +08:00
Excellencedev fe5230cc0b more ui fixes 2025-12-23 04:40:29 +01:00
Excellencedev 302f88892f fix ui 2025-12-22 18:47:42 +01:00
ExcellencedevandGitHub 5da2b95e29 Merge branch 'main' into fix-24635 2025-12-22 18:12:09 +01:00
DaanSelenandGitHub 04607f7d4a fix: spelling error in migrate-storage cmd utility (#36226)
Added closing quote which looks to be forgotten

Signed-off-by: DaanSelen <80752476+DaanSelen@users.noreply.github.com>
2025-12-22 10:55:41 +00:00
ExcellencedevandGitHub a72803dec1 Merge branch 'main' into fix-24635 2025-12-22 08:09:37 +01:00
silverwindandGitHub 60de6cefed Fix WebAuthn error checking (#36219)
Fixes: https://github.com/go-gitea/gitea/issues/36216

Now `detectWebAuthnSupport` returns the error type and lets the caller
decide whether they call `webAuthnError` and show the error. It no
longer shows the error during page load when the user has not even
interacted with the feature.

The bug affects all users on HTTP, so I think a quick fix release for
this might be good.
2025-12-21 18:24:41 +00:00