- 10 Jan, 2023 1 commit
-
-
John Olheiser authored
Backport #22393 Signed-off-by:
jolheiser <john.olheiser@gmail.com>
-
- 02 Jan, 2023 1 commit
-
-
Gusted authored
- Followup for #22231 to follow the frontport.
-
- 30 Dec, 2022 1 commit
-
-
Lunny Xiao authored
backport #22219 Since we changed the /api/v1/ routes to disallow session authentication we also removed their reliance on CSRF. However, we left the ReverseProxy authentication here - but this means that POSTs to the API are no longer protected by CSRF. Now, ReverseProxy authentication is a kind of session authentication, and is therefore inconsistent with the removal of session from the API. This PR proposes that we simply remove the ReverseProxy authentication from the API and therefore users of the API must explicitly use tokens or basic authentication. Replace #22077 Close #22221 Close #22077 Signed-off-by:
Andrew Thornton <art27@cantab.net> Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
zeripath <art27@cantab.net>
-
- 28 Dec, 2022 2 commits
-
-
Gusted authored
- Backport of #22229 - When the GPG key contains an error, such as an invalid signature or an email address that does not match the user.A page will be shown that says you must provide a signature for the token. - This page had two errors: one had the wrong translation key and the other tried to use an undefined variable [`.PaddedKeyID`](https://github.com/go-gitea/gitea/blob/e81ccc406bf723a5a58d685e7782f281736affd4/models/asymkey/gpg_key.go#L65-L72), which is a function implemented on the `GPGKey` struct, given that we don't have that, we use [`KeyID`](https://github.com/go-gitea/gitea/blob/e81ccc406bf723a5a58d685e7782f281736affd4/routers/web/user/setting/keys.go#L102) which is [the fingerprint of the publickey](https://pkg.go.dev/golang.org/x/crypto/openpgp/packet#PublicKey.KeyIdString) and is a valid way for opengpg to refer to a key. <!-- Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) -->
-
Jason Song authored
Backport #22244. Fix #13485. Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
Lauris BH <lauris@nix.lv> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
Lauris BH <lauris@nix.lv> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
- 22 Dec, 2022 2 commits
-
-
KN4CK3R authored
Backport of #22150 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Lauris BH authored
Backport #22208
-
- 21 Dec, 2022 3 commits
-
-
Lunny Xiao authored
Co-authored-by:
techknowlogick <techknowlogick@gitea.io> Co-authored-by:
John Olheiser <john+github@jolheiser.com> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
John Olheiser authored
Backport https://github.com/go-gitea/gitea/pull/22203 Signed-off-by:
jolheiser <john.olheiser@gmail.com>
-
KN4CK3R authored
Backport of #22186 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
- 20 Dec, 2022 2 commits
-
-
Lunny Xiao authored
Disable auto tag so that 1.17 release will not tag `:1`.
-
Gusted authored
- Backport of #22171 - Currently, the 'IsZero' function for 'TimeStamp' just checks if the unix time is zero, which is not the behavior of 'Time.IsZero()', but Gitea is using this method in accordance with the behavior of 'Time.IsZero()'. - Adds a new condition to check for the zero time instant. - Fixes a bug where non-expiring GPG keys where shown as they expired on Jan 01, 0001. - Related https://codeberg.org/Codeberg/Community/issues/791
-
- 19 Dec, 2022 1 commit
-
-
Christian Ullrich authored
Backport #22034 This fixes a bug where, when searching unadopted repositories, active repositories will be listed as well. This is because the size of the array of repository names to check is larger by one than the `IterateBufferSize`. For an `IterateBufferSize` of 50, the original code will pass 51 repository names but set the query to `LIMIT 50`. If all repositories in the query are active (i.e. not unadopted) one of them will be omitted from the result. Due to the `ORDER BY` clause it will be the oldest (or least recently modified) one. Co-authored-by:
Christian Ullrich <christian.ullrich@traditionsa.lu>
-
- 15 Dec, 2022 1 commit
-
-
zeripath authored
Backport #22118 Moved files in a patch will result in git apply returning: ``` error: {filename}: No such file or directory ``` This wasn't handled by the git apply patch code. This PR adds handling for this. Fix #22083 Signed-off-by:
Andrew Thornton <art27@cantab.net> Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
- 14 Dec, 2022 1 commit
-
-
KN4CK3R authored
Backport of #22095 I changed it to a static condition because it needs a new version of xorm which is only available in 1.19. This change is valid because `SearchLatestVersions` is never called to list internal versions and there will no change to this behaviour in <1.19. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
techknowlogick <techknowlogick@gitea.io>
-
- 13 Dec, 2022 2 commits
-
-
Lunny Xiao authored
Fix #21880
-
aceArt-GmbH authored
Backport of #22081 Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
- 12 Dec, 2022 1 commit
-
-
Lunny Xiao authored
Fix #22110
-
- 10 Dec, 2022 1 commit
-
-
KN4CK3R authored
Backport of #21862
-
- 06 Dec, 2022 2 commits
-
-
Jason Song authored
Backport #22037. When deleting a closed issue, we should update both `NumIssues`and `NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`) will be wrong. It's the same for pull requests. Releated to #21557. Alse fixed two harmless problems: - The SQL to check issue/PR total numbers is wrong, that means it will update the numbers even if they are correct. - Replace legacy `num_issues = num_issues + 1` operations with `UpdateRepoIssueNumbers`.
-
zeripath authored
Backport #21902 Although git does expect that author names should be of the form: `NAME <EMAIL>` some users have been able to create commits with: `<EMAIL>` Fix #21900 Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 05 Dec, 2022 1 commit
-
-
6543 authored
Backport #21787 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 04 Dec, 2022 1 commit
-
-
Lunny Xiao authored
Fix #21910 Backport #21921 Co-authored-by:
KN4CK3R <admin@oldschoolhack.me> Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
- 24 Nov, 2022 2 commits
-
-
Xinyu Zhou authored
Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927) Backport #21562 Signed-off-by:
Xinyu Zhou <i@sourcehut.net> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
Xinyu Zhou authored
Backport #21884 Committer avatar rendered by `func AvatarByEmail` are not vertical align as `func Avatar` does. - Replace literals `ui avatar` and `ui avatar vm` with the constant `DefaultAvatarClass` Signed-off-by:
Xinyu Zhou <i@sourcehut.net>
-
- 20 Nov, 2022 2 commits
-
-
KN4CK3R authored
Backport #21833
-
KN4CK3R authored
Backport of #21849 Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 18 Nov, 2022 1 commit
-
-
Gusted authored
- Backport #21856 - It's possible that the `user_redirect` table contains a user id that no longer exists. - Delete a user redirect upon deleting the user. - Add a check for these dangling user redirects to check-db-consistency.
-
- 14 Nov, 2022 1 commit
-
-
zeripath authored
When backporting #20902 in #21058 there was a slight misbackport. It was missed that we needed to remove the global command option before setting the settings. Fix #21805 Signed-off-by:
Andrew Thornton <art27@cantab.net>
-
- 13 Nov, 2022 3 commits
-
-
zeripath authored
Backport #21791 There was a bug introduced in #21352 due to a change of behaviour caused by #19280. This causes a panic on running the default doctor checks because the panic introduced by #19280 assumes that the only way opts.StdOut and opts.Stderr can be set in RunOpts is deliberately. Unfortunately, when running a git.Command the provided RunOpts can be set, therefore if you share a common set of RunOpts these two values can be set by the previous commands. This PR stops using common RunOpts for the commands in that doctor check but secondly stops RunCommand variants from changing the provided RunOpts. Signed-off-by:
Andrew Thornton <art27@cantab.net>
-
Gusted authored
- Backport #21792 - Update the crypto dependency to include https://github.com/golang/crypto/commit/6fad3dfc18918c2ac9c112e46b32473bd2e5e2f9 - Resolves #17798 Co-authored-by:
John Olheiser <john.olheiser@gmail.com>
-
Jason Song authored
Backport #21720. Fix #20921. The `ctx.Repo.GitRepo` has been used in deleting issues when the issue is a PR. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 11 Nov, 2022 2 commits
-
-
silverwind authored
-
Xinyu Zhou authored
Backport #21352 Due to a bug in presumably an older version of Gitea, multiple of my repositories still have their HEADs pointing to a `master` branch while the default branch on the UI is listed as `main`. This adds a `gitea doctor` command that will fix all of the HEAD references for repos when they're not synchronized with the default branch in the DB. This will help with cloning to ensure that git automatically checks out the right branch, instead of a nonexistent one. Note: I'm not sure if I actually need to do more other than add a file here. Will try testing this out on my server soon. Co-authored-by:
Clar Fon <15850505+clarfonthey@users.noreply.github.com> Co-authored-by:
zeripath <art27@cantab.net> Co-authored-by:
wxiaoguang <wxiaoguang@gmail.com> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
- 10 Nov, 2022 3 commits
-
-
wxiaoguang authored
Backport #21764 Some database migrations depend on the git module.
-
Jason Song authored
Backport #21731. Fix #21698. Set the last login time to the current time when activating the user successfully. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Xinyu Zhou authored
Backport #21597 Related: * https://github.com/go-gitea/gitea/pull/21596#issuecomment-1291450224 There was a bug when switching language by AJAX: the irrelevant POST requests were processed by the target page's handler. Now, use GET instead of POST. The GET requests should be harmless. Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
Jason Song <i@wolfogre.com> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
wxiaoguang <wxiaoguang@gmail.com>
-
- 09 Nov, 2022 3 commits
-
-
Wayne Starr authored
Backport (#21708) This addresses #21707 and adds a second package test case for a non-semver compatible version (this might be overkill though since you could also edit the old package version to have an epoch in front and see the error, this just seemed more flexible for the future). Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
Wayne Starr authored
Backport (#21568) This PR fixes issue #21567 allowing for package tarball URLs to match the upstream registry (and GitLab/JFrog Artifactory URLs). It uses a regex to parse the filename (which contains the NPM version) and does a fuzzy search to pull it out. The regex was built/expanded from http://json.schemastore.org/package, https://github.com/Masterminds/semver, and https://docs.npmjs.com/cli/v6/using-npm/semver and is testable here: https://regex101.com/r/OydBJq/5 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Wayne Starr authored
Backport (#21690) Fixes #21683 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-