]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoFix consistency check (#15120) (#15128)
zeripath [Tue, 23 Mar 2021 19:20:34 +0000 (19:20 +0000)]
Fix consistency check (#15120) (#15128)

In my last fix I missed adding the label_ prefix to the
consistency check count.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix bug on avatar middleware (#15124) (#15126)
6543 [Tue, 23 Mar 2021 18:44:37 +0000 (19:44 +0100)]
Fix bug on avatar middleware (#15124) (#15126)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[Vendor] update gitea-sdk v0.14.0 (#15103) (#15107)
6543 [Tue, 23 Mar 2021 10:10:32 +0000 (11:10 +0100)]
[Vendor] update gitea-sdk v0.14.0 (#15103) (#15107)

* upgraded code.gitea.io/sdk/gitea v0.13.2 => v0.14.0

* rm workaround

3 years agoChangelog for v1.14-rc2 (#15115)
zeripath [Mon, 22 Mar 2021 21:00:51 +0000 (21:00 +0000)]
Changelog for v1.14-rc2 (#15115)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix another clusterfuzz identified issue (#15096) (#15113)
zeripath [Mon, 22 Mar 2021 19:16:08 +0000 (19:16 +0000)]
Fix another clusterfuzz identified issue (#15096) (#15113)

Backport #15096

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix the v176 migration (#15110) (#15111)
zeripath [Mon, 22 Mar 2021 18:47:58 +0000 (18:47 +0000)]
Fix the v176 migration (#15110) (#15111)

Backport #15110

There is a serious issue with the v176 migration where there is a mistaken missing
label_id selection.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix lock modal content rendering outside modal (#15095) (#15100)
silverwind [Mon, 22 Mar 2021 01:00:42 +0000 (02:00 +0100)]
Fix lock modal content rendering outside modal (#15095) (#15100)

* Fix lock modal content rendering outside modal

The .content was not a child to .modal so was rendering outside. This is
a recent regression but I'm not certain when it was introduced.

* remove extraneous closing div

Co-authored-by: zeripath <art27@cantab.net>
3 years agoPlace wrapper around comment as diff to catch panics (#15085) (#15094)
zeripath [Sun, 21 Mar 2021 22:41:40 +0000 (22:41 +0000)]
Place wrapper around comment as diff to catch panics (#15085) (#15094)

Backport #15085

There are a few recurrent issues with comment as diff reporting panics that are resistant to fixing due to the fact that the panic occurs in the template render and is swallowed by the template renderer.

This PR just adds some logging to force the panic to properly logged and re-propagates back up to the template renderer so we can actually detect what the issue is.

Signed-off-by: Andrew Thornton art27@cantab.net
3 years agoFix markdown rendering in milestone content (#15056) (#15091)
silverwind [Sun, 21 Mar 2021 17:57:06 +0000 (18:57 +0100)]
Fix markdown rendering in milestone content (#15056) (#15091)

- Add missing markdown class for rendered markdown.
- Increase font size of milestone name in list.

Fixes: https://github.com/go-gitea/gitea/issues/15046
3 years agoRemove possible resource leak (#15067) (#15082)
6543 [Sun, 21 Mar 2021 16:07:37 +0000 (17:07 +0100)]
Remove possible resource leak (#15067) (#15082)

* move "copy uploaded lfs files 2 repo" to own function for "defer file.Close()"

* rm type overload

Co-authored-by: zeripath <art27@cantab.net>
3 years agofix double 'push tag' action feed (#15078) (#15083)
a1012112796 [Sun, 21 Mar 2021 14:51:31 +0000 (22:51 +0800)]
fix double 'push tag' action feed (#15078) (#15083)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoHandle unauthorized user events gracefully (#15071) (#15074)
Lauris BH [Sun, 21 Mar 2021 10:21:28 +0000 (12:21 +0200)]
Handle unauthorized user events gracefully (#15071) (#15074)

3 years agoUpdate release date (#15065) v1.14.0-rc1
Lauris BH [Sat, 20 Mar 2021 13:29:01 +0000 (15:29 +0200)]
Update release date (#15065)

* Update release date

* Remove unneeded entry

3 years agoUpdate to goldmark 1.3.3 (#15059) (#15060)
zeripath [Sat, 20 Mar 2021 11:24:09 +0000 (11:24 +0000)]
Update to goldmark 1.3.3 (#15059) (#15060)

Backport #15059

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix bug when upload on web (#15042) (#15054)
6543 [Sat, 20 Mar 2021 01:37:57 +0000 (02:37 +0100)]
Fix bug when upload on web (#15042) (#15054)

* Fix bug when upload on web

* move into own function

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoChangelog for 1.14.0-RC1 (#14935)
6543 [Fri, 19 Mar 2021 20:42:57 +0000 (21:42 +0100)]
Changelog for 1.14.0-RC1 (#14935)

* Changelog for 1.14.0-RC1

* api

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* update

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>
* Update CHANGELOG.md

Co-authored-by: techknowlogick <matti@mdranta.net>
* update

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review

* Move things to SECURITY that are SECURITY

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update CHANGELOG.md

Co-authored-by: Lauris BH <lauris@nix.lv>
* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Norwin <noerw@users.noreply.github.com>
* Update CHANGELOG.md

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* sort

* Update CHANGELOG.md

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* :gitea: :rocket:

* Update date

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Kyle D. <kdumontnu@gmail.com>
3 years agoDelete Labels & IssueLabels on Repo Delete too (#15039)
6543 [Fri, 19 Mar 2021 19:01:24 +0000 (20:01 +0100)]
Delete Labels & IssueLabels on Repo Delete too (#15039)

* Doctor: find IssueLabels without existing label

* on Repo Delete: delete labels & issue_labels too

* performance nits

* Add Migration: Delete orphaned IssueLabels

* Migration v174: use Sync2

* USE sess !!!

* better func name

* code format & comment

* RAW SQL

* Update models/migrations/v176.go

* next try?

3 years agoPrevent addition of labels from outside the repository or organisation in issues...
zeripath [Fri, 19 Mar 2021 13:25:14 +0000 (13:25 +0000)]
Prevent addition of labels from outside the repository or organisation in issues (#14912)

* Never add labels not from this repository or organisation and remove org labels on transfer

Prevent the addition of labels from outside of the repository or
organisation and remove organisation labels on transfer.

Related #14908

Signed-off-by: Andrew Thornton <art27@cantab.net>
* switch to use sql

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove AS

Signed-off-by: Andrew Thornton <art27@cantab.net>
* subquery alias

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Give me some AS?

Signed-off-by: Andrew Thornton <art27@cantab.net>
* double AS

Signed-off-by: Andrew Thornton <art27@cantab.net>
* try try again

Signed-off-by: Andrew Thornton <art27@cantab.net>
* once more around the merry go round

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix api problem

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add outside label consistency check into doctor

This PR adds another consistency check into doctor in order to detect
labels that have been added from outside of repositories and organisations

Fix #14908

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix migration

Signed-off-by: Andrew Thornton <art27@cantab.net>
* prep for merge

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix UI elements getting underline like links (#15038)
Mike L [Fri, 19 Mar 2021 02:21:28 +0000 (03:21 +0100)]
Fix UI elements getting underline like links (#15038)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 19 Mar 2021 00:13:12 +0000 (00:13 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix CJK fonts again and misc. font issues (#14575)
Mike L [Thu, 18 Mar 2021 23:43:43 +0000 (00:43 +0100)]
Fix CJK fonts again and misc. font issues (#14575)

* Push system-ui further down the stack, fix #12966

* Fix Firefox showing U+300x in emoji font and more

* Revert emoji font and fix long-standing Safari bug

* Exclude Safari emoji fix above 1.25x zoom

* Minor correctness/typo fix, affects only legacy platforms

* Emoji consistency for monospace (e.g. EasyMDE)

* Override paradigm; macOS/iOS-specific metric fix

* Move whitespace fix to font-face

* Handle metric calculation errors with Firefox

* One last workaround for aliased fonts in Linux

3 years agoanother clusterfuzz spotted issue (#15032)
zeripath [Thu, 18 Mar 2021 21:37:11 +0000 (21:37 +0000)]
another clusterfuzz spotted issue (#15032)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix hover color for last row of repo file list (#15018)
Mike L [Thu, 18 Mar 2021 18:05:26 +0000 (19:05 +0100)]
Fix hover color for last row of repo file list (#15018)

3 years agoDo not convert file path to lowercase (#15023)
KN4CK3R [Thu, 18 Mar 2021 13:58:47 +0000 (14:58 +0100)]
Do not convert file path to lowercase (#15023)

* Do not convert file path to lowercase.

* lint

* Check against lowercase hostname.

3 years agofix href on label in sidebar (#15022)
Norwin [Thu, 18 Mar 2021 12:47:17 +0000 (12:47 +0000)]
fix href on label in sidebar (#15022)

3 years agoFix postgres ID sequences broken by recreate-table (#15015)
zeripath [Thu, 18 Mar 2021 06:06:40 +0000 (06:06 +0000)]
Fix postgres ID sequences broken by recreate-table (#15015)

* Fix postgres ID sequences broken by recreate-table

Unfortunately there is a subtle problem with recreatetable on postgres which
leads to the sequences not being renamed and not being left at 0.

Fix #14725

Signed-off-by: Andrew Thornton <art27@cantab.net>
* let us try information_schema instead

Signed-off-by: Andrew Thornton <art27@cantab.net>
* try again

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoRemove extraneous logging (#15020)
zeripath [Thu, 18 Mar 2021 03:25:52 +0000 (03:25 +0000)]
Remove extraneous logging (#15020)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoCreate new issue from code (#14863)
Roger Luo [Thu, 18 Mar 2021 02:02:38 +0000 (10:02 +0800)]
Create new issue from code (#14863)

* Feat: add reference in new issue with permalink menu for code view.

* Fix: recover index.js file.

* Add comments and redo ci.

* Fix code convention

* Fix code.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 18 Mar 2021 00:12:43 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoorg dashboard: move teamselector left (#14954)
Norwin [Wed, 17 Mar 2021 22:45:16 +0000 (22:45 +0000)]
org dashboard: move teamselector left (#14954)

Co-authored-by: zeripath <art27@cantab.net>
3 years agosupport gitmailmap in GetCodeActivityStats() (#15009)
a1012112796 [Wed, 17 Mar 2021 21:00:26 +0000 (05:00 +0800)]
support gitmailmap in GetCodeActivityStats() (#15009)

ref:
- https://git-scm.com/docs/gitmailmap
- https://git-scm.com/docs/git-log#Documentation/git-log.txt-emaNem

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agosort release attachments by name (#15008)
Norwin [Wed, 17 Mar 2021 09:25:49 +0000 (09:25 +0000)]
sort release attachments by name (#15008)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agochore: bump minio to RELEASE.2021-03-12T00-00-47Z (#15006)
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf [Wed, 17 Mar 2021 08:40:52 +0000 (09:40 +0100)]
chore: bump minio to RELEASE.2021-03-12T00-00-47Z (#15006)

* chore: bump minio to RELEASE.2021-03-12T00-00-47Z

-    image: minio/minio:RELEASE.2021-01-16T02-19-44Z
+    image: minio/minio:RELEASE.2021-03-12T00-00-47Z

Signed-off-by: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <a_mirre@utb.cz>
3 years agoValidate email in oauth registration form (#15014)
Kyle D [Wed, 17 Mar 2021 03:54:02 +0000 (21:54 -0600)]
Validate email in oauth registration form (#15014)

3 years agoFixed wrong migrate url error description. (#15010)
KN4CK3R [Wed, 17 Mar 2021 02:34:09 +0000 (03:34 +0100)]
Fixed wrong migrate url error description. (#15010)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 17 Mar 2021 00:12:36 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofix: {show,link to} proper PR on kanban board ref (#15004)
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf [Tue, 16 Mar 2021 15:42:25 +0000 (16:42 +0100)]
fix: {show,link to} proper PR on kanban board ref (#15004)

the issue was that PR references in kanban boards were being generated
using `.ID` instead of `.Index`, which led to constructing incorrect
links to possibly non-existent {PR,issue}s and following that to showing
nonsensical values in the boards.

kudos also go to @zeripath for pointing at the file to fix.

Signed-off-by: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <a_mirre@utb.cz>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoadd pat-s to MAINTAINERS list (#15007)
Patrick Schratz [Tue, 16 Mar 2021 14:37:04 +0000 (15:37 +0100)]
add pat-s to MAINTAINERS list (#15007)

3 years agoEnsure that new pull request button works on forked forks owned by owner of the root...
zeripath [Tue, 16 Mar 2021 01:36:34 +0000 (01:36 +0000)]
Ensure that new pull request button works on forked forks owned by owner of the root (#14932)

Prevent 404 on new pull request button on forked fork owned by the owner
of the root repository. Also ensure that the names make sense.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMove repo.CloseIssuesViaCommitInAnyBranch to issue settings (#14965)
Norwin [Tue, 16 Mar 2021 01:00:52 +0000 (01:00 +0000)]
Move repo.CloseIssuesViaCommitInAnyBranch to issue settings (#14965)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 16 Mar 2021 00:12:50 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix several render issues (#14986)
zeripath [Mon, 15 Mar 2021 23:20:05 +0000 (23:20 +0000)]
Fix several render issues (#14986)

* Fix an issue with panics related to attributes
* Wrap goldmark render in a recovery function
* Reduce memory use in render emoji
* Use a pipe for rendering goldmark - still needs more work and a limiter

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoAdd reverse proxy configuration support for remote IP address (#14959)
Lauris BH [Mon, 15 Mar 2021 22:27:28 +0000 (00:27 +0200)]
Add reverse proxy configuration support for remote IP address (#14959)

* Add reverse proxy configuration support for remote IP address validation

* Trust all IP addresses in containerized environments by default

* Use single option to specify networks and proxy IP addresses. By default trust all loopback IPs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoEnsure validation occurs on clone addresses too (#14994)
zeripath [Mon, 15 Mar 2021 21:52:11 +0000 (21:52 +0000)]
Ensure validation occurs on clone addresses too (#14994)

* Ensure validation occurs on clone addresses too

Fix #14984

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix api tests

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpdate comparison docs for gitlab (#14999)
tuxmaster5000 [Mon, 15 Mar 2021 15:19:00 +0000 (16:19 +0100)]
Update comparison docs for gitlab (#14999)

3 years agoUpdate go-enry to v2.6.1 (#14997)
Lauris BH [Mon, 15 Mar 2021 03:20:02 +0000 (05:20 +0200)]
Update go-enry to v2.6.1 (#14997)

Co-authored-by: Gitea <gitea@gitea.io>
3 years agoFix repo page language stat span color (#14993)
Mike L [Sun, 14 Mar 2021 20:27:58 +0000 (21:27 +0100)]
Fix repo page language stat span color (#14993)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agochore(models): rewrite code format. (#14754)
Bo-Yi Wu [Sun, 14 Mar 2021 18:52:12 +0000 (02:52 +0800)]
chore(models): rewrite code format. (#14754)

* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.

3 years agoMake sure sibling images get a link too (#14979)
zeripath [Sun, 14 Mar 2021 16:36:51 +0000 (16:36 +0000)]
Make sure sibling images get a link too (#14979)

* Make sure sibling images get a link too

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix #12925

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoDo not show full lfs file on error in git_test.go:rawTest() (#14980)
zeripath [Sun, 14 Mar 2021 15:53:59 +0000 (15:53 +0000)]
Do not show full lfs file on error in git_test.go:rawTest() (#14980)

If there is a problem uploading to LFS it is possible for the raw
endpoint to return a very large file when a pointer file is expected
This will then cause the drone logs to fill up unnecessarily with
the contents of the very large file.

If the file returned from raw is of the incorrect size we should
therefore not test it see if it contains the pointer file
and just declare that it is incorrect.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRe-enable listing of forks when logged out (#14992)
Mike L [Sun, 14 Mar 2021 14:48:28 +0000 (15:48 +0100)]
Re-enable listing of forks when logged out (#14992)

* Re-enable listing of forks when logged out

* Further improvements on repo button logic

3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 14 Mar 2021 00:12:26 +0000 (00:12 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoAPI: fix set milestone on PR creation (#14981)
Norwin [Sat, 13 Mar 2021 18:06:52 +0000 (18:06 +0000)]
API: fix set milestone on PR creation (#14981)

* API: fix set milestone on PR creation

pr creation via API failed with 404, because we searched
for milestoneID 0, due to uninitialized var usage D:

* add tests

* fix expected status codes

* fix tests

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix spacing of issue/pulls list review status icons (#14985)
Mike L [Sat, 13 Mar 2021 13:37:09 +0000 (14:37 +0100)]
Fix spacing of issue/pulls list review status icons (#14985)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 13 Mar 2021 00:12:41 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofix release mail html template (#14975)
Norwin [Fri, 12 Mar 2021 21:47:52 +0000 (21:47 +0000)]
fix release mail html template (#14975)

was missing an </a>

3 years agocheck if original author is set (#14971)
Norwin [Fri, 12 Mar 2021 21:01:33 +0000 (21:01 +0000)]
check if original author is set (#14971)

Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix Anchor jumping with escaped query components (#14969)
zeripath [Fri, 12 Mar 2021 18:59:13 +0000 (18:59 +0000)]
Fix Anchor jumping with escaped query components (#14969)

Fix #14968

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoNever add labels not from this repository or organisation and remove org labels on...
zeripath [Fri, 12 Mar 2021 17:45:49 +0000 (17:45 +0000)]
Never add labels not from this repository or organisation and remove org labels on transfer (#14928)

* Never add labels not from this repository or organisation and remove org labels on transfer

Prevent the addition of labels from outside of the repository or
organisation and remove organisation labels on transfer.

Related #14908

* switch to use sql

* subquery alias

* once more around the merry go round

* fix api problem

3 years agoFix excluding more than two labels on issues list (#14962)
zeripath [Fri, 12 Mar 2021 16:07:23 +0000 (16:07 +0000)]
Fix excluding more than two labels on issues list (#14962)

* Fix excluding more than two labels on issues list

Fix #14840

Signed-off-by: Andrew Thornton <art27@cantab.net>
* refactor DRY

* fix multiple-label filter on milestone issuelist

* Apply suggestions from code review

Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
* Update web_src/js/index.js

Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
3 years agodon't show project cog in issue sidebar if no permission (#14953)
Norwin [Fri, 12 Mar 2021 15:14:02 +0000 (15:14 +0000)]
don't show project cog in issue sidebar if no permission (#14953)

3 years agoPrevent incorrect HTML escaping in swagger.json (#14957)
zeripath [Fri, 12 Mar 2021 04:43:04 +0000 (04:43 +0000)]
Prevent incorrect HTML escaping in swagger.json (#14957)

* Prevent incorrect HTML escaping in swagger.json

Fix #14706

Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops add it to the helper

Signed-off-by: Andrew Thornton <art27@cantab.net>
* try again

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoShow correct issues for team dashboard (#14952)
Norwin [Fri, 12 Mar 2021 03:06:33 +0000 (03:06 +0000)]
Show correct issues for team dashboard (#14952)

* fix no items under /org/$org/{issues,pulls}?type=mentioned

it was filtering by org id, but org-mentions are not persisted like that
to the DB, we need to filter by UID.
This means, selecting different teams will only have an effect on the
selected repos, otherwise results will be the same, which may be
suboptimal.

fixes #14941

* don't spam a warning for a perfectly fine request

3 years agoCI: pre install git last verson and git lfs in test (#14681)
a1012112796 [Fri, 12 Mar 2021 02:04:43 +0000 (10:04 +0800)]
CI: pre install git last verson and git lfs in test (#14681)

link:
https://hub.docker.com/r/gitea/test_env
Source:
https://gitea.com/gitea/test_env/src/branch/master/Dockerfile

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 12 Mar 2021 00:12:35 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd kdumontnu to MAINTAINERS (#14964)
Kyle D [Thu, 11 Mar 2021 22:25:07 +0000 (15:25 -0700)]
Add kdumontnu to MAINTAINERS (#14964)

3 years agoPrevent panic when editing forked repos by API (#14960)
zeripath [Thu, 11 Mar 2021 18:09:52 +0000 (18:09 +0000)]
Prevent panic when editing forked repos by API (#14960)

When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix #14956

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd ui.explore settings to control view of explore pages (2) (#14094)
zeripath [Thu, 11 Mar 2021 13:40:54 +0000 (13:40 +0000)]
Add ui.explore settings to control view of explore pages (2) (#14094)

This is an alternative PR to #13687.

Add `[ui.explore]` settings to allow restricting the
explore pages to logged in users only and to disable the users explore page.

The two proposed settings are:

- `REQUIRE_SIGNIN_VIEW`: Only allows access to the explore pages if the
user is signed in. Also restricts
  - `/api/v1/user/search`
  - `/api/v1/users/{username}`
  - `/api/v1/users/{username}/repos`
  - but does not restrict `/api/v1/users/{username}/heatmap`
- `DISABLE_USERS_PAGE`: Disables the /explore/users page

Fix #2908

Close #13687

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoUse correct default value (#14949)
KN4CK3R [Thu, 11 Mar 2021 05:09:30 +0000 (06:09 +0100)]
Use correct default value (#14949)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agobuild darwin on arm64 platforms (#14951)
techknowlogick [Thu, 11 Mar 2021 04:59:57 +0000 (23:59 -0500)]
build darwin on arm64 platforms (#14951)

fix #14945

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 11 Mar 2021 00:12:39 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 10 Mar 2021 00:12:39 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix typo in .golangci.yml (#14933)
Ikko Ashimine [Tue, 9 Mar 2021 08:38:18 +0000 (17:38 +0900)]
Fix typo in .golangci.yml (#14933)

occured -> occurred

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 9 Mar 2021 00:12:38 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[API] get pull, return head branch sha, even if deleted (#14931)
6543 [Mon, 8 Mar 2021 20:48:31 +0000 (21:48 +0100)]
[API] get pull, return head branch sha, even if deleted (#14931)

* API: return head branch sha, even if deleted

* relax if ref not resolvable

3 years agoMove Workaround for #12675 into it's own function (#14922)
6543 [Mon, 8 Mar 2021 19:00:19 +0000 (20:00 +0100)]
Move Workaround for #12675 into it's own function (#14922)

* Move Workatround for #12675 into it's own function

* use more reliable solution (as tea do)

3 years agoMinor UI fixes (#14926)
Norwin [Mon, 8 Mar 2021 17:55:37 +0000 (17:55 +0000)]
Minor UI fixes (#14926)

* disable fork button when not signed in

* fix commit body styling on PR page

* fixup! fix commit body styling on PR page

3 years agoAdd "captcha" to list of reserved usernames (#14929)
fnetX (aka fralix) [Mon, 8 Mar 2021 16:49:29 +0000 (17:49 +0100)]
Add "captcha" to list of reserved usernames (#14929)

Signed-off-by: Otto Richter <git@fralix.ovh>
3 years agoFix alignment of People and Teams right arrow on org homepage (#14924)
zeripath [Mon, 8 Mar 2021 14:52:58 +0000 (14:52 +0000)]
Fix alignment of People and Teams right arrow on org homepage (#14924)

Fix #14854

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoRe-enable import local paths after reversion from #13610 (#14925)
zeripath [Mon, 8 Mar 2021 13:10:17 +0000 (13:10 +0000)]
Re-enable import local paths after reversion from #13610 (#14925)

PR #13610 unfortunately disabled importing repositories from local paths.
This PR restores this functionality.

Fix #14700

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMake internal SSH server host key path configurable (#14918)
zeripath [Mon, 8 Mar 2021 02:43:59 +0000 (02:43 +0000)]
Make internal SSH server host key path configurable (#14918)

* Make SSH server host key path configurable

* make it possible to have multiple keys

* Make gitea.rsa the default key

* Add some more logging

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix overdue marking of closed issues and milestones (#14923)
zeripath [Mon, 8 Mar 2021 01:55:57 +0000 (01:55 +0000)]
Fix overdue marking of closed issues and milestones (#14923)

Closed milestones and issues should only be marked overdue if they were
closed after their deadline.

Fix: #14536

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 8 Mar 2021 00:12:25 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoChangelog v1.13.4 (#14917) (#14920)
6543 [Sun, 7 Mar 2021 23:07:02 +0000 (00:07 +0100)]
Changelog v1.13.4 (#14917) (#14920)

3 years agodocs: swagger show models by default (#14880)
Norwin [Sun, 7 Mar 2021 21:19:14 +0000 (21:19 +0000)]
docs: swagger show models by default (#14880)

3 years agoFix migration context data (#14910)
KN4CK3R [Sun, 7 Mar 2021 19:21:09 +0000 (20:21 +0100)]
Fix migration context data (#14910)

* Unified context data.

* Changed method name.

3 years agoAdd SameSite setting for cookies (#14900)
zeripath [Sun, 7 Mar 2021 08:12:43 +0000 (08:12 +0000)]
Add SameSite setting for cookies (#14900)

Add SameSite setting for cookies and rationalise the cookie setting code. Switches SameSite to Lax by default.

There is a possible future extension of differentiating which cookies could be set at Strict by default but that is for a future PR.

Fix #5583

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoPrevent panic when empty MilestoneID in repo/issue/list (#14911)
zeripath [Sun, 7 Mar 2021 02:25:54 +0000 (02:25 +0000)]
Prevent panic when empty MilestoneID in repo/issue/list (#14911)

This PR adds a simple check to only test the MilestoneID if it is not empty.

Fix #14906

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 7 Mar 2021 00:12:31 +0000 (00:12 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoFix race in LFS ContentStore.Put(...) (#14895)
zeripath [Sat, 6 Mar 2021 20:21:56 +0000 (20:21 +0000)]
Fix race in LFS ContentStore.Put(...) (#14895)

Continuing on from #14888

The previous implementation has race whereby an incomplete upload or
hash mismatch upload can end up in the ContentStore. This PR moves the
validation into the reader so that if there is a hash error or size
mismatch the reader will return with an error instead of an io.EOF
causing the storage to abort the storage.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix issue search with db indexer because of mysql 5.7 sqlmode (#14907)
Lunny Xiao [Sat, 6 Mar 2021 15:11:12 +0000 (23:11 +0800)]
Fix issue search with db indexer because of mysql 5.7 sqlmode (#14907)

* Fix sqlmode bug

* distinct is necessary

3 years agoHide resync all ssh principals when using internal ssh server (#14904)
Lunny Xiao [Sat, 6 Mar 2021 07:32:08 +0000 (15:32 +0800)]
Hide resync all ssh principals when using internal ssh server (#14904)

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix a couple of issues with a feeds (#14897)
zeripath [Sat, 6 Mar 2021 04:09:49 +0000 (04:09 +0000)]
Fix a couple of issues with a feeds (#14897)

@CirnoT spotted a couple of issues with feeds on discord.

This PR fixes both of these.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 6 Mar 2021 00:12:35 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoSigned-off-by: jolheiser <john.olheiser@gmail.com> (#14898)
John Olheiser [Fri, 5 Mar 2021 21:00:15 +0000 (15:00 -0600)]
Signed-off-by: jolheiser <john.olheiser@gmail.com> (#14898)
3 years agoFix bug when combine label comments (#14894)
Lunny Xiao [Fri, 5 Mar 2021 15:17:32 +0000 (23:17 +0800)]
Fix bug when combine label comments (#14894)

* Fix bug when combine label comments

* Added some code comments

* More comments

3 years agoFix race in local storage (#14888)
zeripath [Fri, 5 Mar 2021 13:19:17 +0000 (13:19 +0000)]
Fix race in local storage (#14888)

LocalStorage should only put completed files in position

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoWhen transfering repository and database transaction failed, rollback the renames...
Lunny Xiao [Fri, 5 Mar 2021 02:28:52 +0000 (10:28 +0800)]
When transfering repository and database transaction failed, rollback the renames (#14864)

Fix #14821

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoShow private heatmap on profile to self & admins (#14881)
Norwin [Thu, 4 Mar 2021 22:59:13 +0000 (22:59 +0000)]
Show private heatmap on profile to self & admins (#14881)

followup to #14080

3 years agoIsUserAllowedToUpdate ignore igonre if user is nil (#14885)
6543 [Thu, 4 Mar 2021 18:27:54 +0000 (19:27 +0100)]
IsUserAllowedToUpdate ignore igonre if user is nil (#14885)