Commit Graph
11202 Commits
Author SHA1 Message Date
silverwindandGitHub 4fd6e82198 Fix lock modal content rendering outside modal (#15095)
* 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
2021-03-21 19:58:28 +01:00
6543andGitHub 98c8513db2 Changelog v1.13.5 (#15084) (#15093)
* Changelog v1.13.5 (#15084)

* fix unrel. nit
2021-03-21 13:58:19 -04:00
zeripathandGitHub 46782d53bc Place wrapper around comment as diff to catch panics (#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 [email protected]
2021-03-21 16:59:58 +00:00
6543andGitHub 24f7bd5899 Use i18n.Reset to reload locales (#15073) 2021-03-21 16:11:36 +01:00
a1012112796andGitHub 17731e05ff fix double 'push tag' action feed (#15078)
Signed-off-by: a1012112796 <[email protected]>
2021-03-21 11:11:22 +01:00
Lauris BHandGitHub 2f0eb9fd5d Handle unauthorized user events gracefully (#15071) 2021-03-20 21:39:43 +01:00
78e8f62706 [Refactor] remove possible resource leak (#15067)
* move "copy uploaded lfs files 2 repo" to own function for "defer file.Close()"

* rm type overload

* Update modules/repofiles/upload.go

Co-authored-by: zeripath <[email protected]>
2021-03-21 00:30:29 +08:00
zeripathandGitHub 9ed9ed9ae0 Update to goldmark 1.3.3 (#15059)
Signed-off-by: Andrew Thornton <[email protected]>
2021-03-20 12:23:55 +01:00
silverwindandGitHub d05539eb3e Fix markdown rendering in milestone content (#15056)
- Add missing markdown class for rendered markdown.
- Increase font size of milestone name in list.

Fixes: https://github.com/go-gitea/gitea/issues/15046
2021-03-20 10:36:52 +01:00
GiteaBot bb5eb849f2 [skip ci] Updated translations via Crowdin 2021-03-20 00:12:40 +00:00
0fe32826ed Allow read/write to user root and only read to group git on documentation (#15041)
Co-authored-by: Lasse Brandt Thomsen <[email protected]>
2021-03-20 00:45:04 +01:00
cf549500e0 Fix bug when upload on web (#15042)
* Fix bug when upload on web

* move into own function

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
2021-03-19 23:49:29 +01:00
fcf2c97d39 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 <[email protected]>

* Apply suggestions from code review

Co-authored-by: zeripath <[email protected]>

* update

* Apply suggestions from code review

Co-authored-by: techknowlogick <[email protected]>

* Update CHANGELOG.md

Co-authored-by: techknowlogick <[email protected]>

* update

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: zeripath <[email protected]>

* Apply suggestions from code review

* Move things to SECURITY that are SECURITY

Signed-off-by: Andrew Thornton <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Lauris BH <[email protected]>

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Norwin <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Kyle D. <[email protected]>

* sort

* Update CHANGELOG.md

Co-authored-by: Kyle D. <[email protected]>

* :gitea: 🚀

* Update date

Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Norwin <[email protected]>
Co-authored-by: Kyle D. <[email protected]>
2021-03-19 22:42:57 +02:00
6543andGitHub a3a65137ba 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?
2021-03-19 21:01:24 +02:00
dace0ce1b1 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 <[email protected]>

* switch to use sql

Signed-off-by: Andrew Thornton <[email protected]>

* remove AS

Signed-off-by: Andrew Thornton <[email protected]>

* subquery alias

Signed-off-by: Andrew Thornton <[email protected]>

* Give me some AS?

Signed-off-by: Andrew Thornton <[email protected]>

* double AS

Signed-off-by: Andrew Thornton <[email protected]>

* try try again

Signed-off-by: Andrew Thornton <[email protected]>

* once more around the merry go round

Signed-off-by: Andrew Thornton <[email protected]>

* fix api problem

Signed-off-by: Andrew Thornton <[email protected]>

* 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 <[email protected]>

* fix migration

Signed-off-by: Andrew Thornton <[email protected]>

* prep for merge

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2021-03-19 21:25:14 +08:00
Mike LandGitHub 54d7b0f8e7 Fix UI elements getting underline like links (#15038) 2021-03-19 03:21:28 +01:00
GiteaBot 99707791ed [skip ci] Updated translations via Crowdin 2021-03-19 00:13:12 +00:00
Mike LandGitHub 0e5c6c4498 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
2021-03-19 00:43:43 +01:00
zeripathandGitHub c0c052bdbb another clusterfuzz spotted issue (#15032)
Signed-off-by: Andrew Thornton <[email protected]>
2021-03-18 22:37:11 +01:00
Mike LandGitHub 0e95a41ccd Fix hover color for last row of repo file list (#15018) 2021-03-18 18:05:26 +00:00
KN4CK3RandGitHub e8ad6c1ff3 Do not convert file path to lowercase (#15023)
* Do not convert file path to lowercase.

* lint

* Check against lowercase hostname.
2021-03-18 13:58:47 +00:00
NorwinandGitHub 032f4c3969 fix href on label in sidebar (#15022) 2021-03-18 14:47:17 +02:00
070c57867d 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 <[email protected]>

* let us try information_schema instead

Signed-off-by: Andrew Thornton <[email protected]>

* try again

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-03-18 02:06:40 -04:00
zeripathandGitHub 71aca93dec Remove extraneous logging (#15020)
Signed-off-by: Andrew Thornton <[email protected]>
2021-03-18 04:25:52 +01:00
119d2cb6e4 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 <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-03-17 22:02:38 -04:00
GiteaBot 03e99f847c [skip ci] Updated translations via Crowdin 2021-03-18 00:12:43 +00:00
598dd21cd4 org dashboard: move teamselector left (#14954)
Co-authored-by: zeripath <[email protected]>
2021-03-17 18:45:16 -04:00
27b8eff96b 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 <[email protected]>

Co-authored-by: zeripath <[email protected]>
2021-03-17 17:00:26 -04:00
5d57f4bcb8 sort release attachments by name (#15008)
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2021-03-17 11:25:49 +02:00
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHfandGitHub 51ea8dd444 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 <[email protected]>
2021-03-17 08:40:52 +00:00
Kyle DandGitHub df891dc59f Validate email in oauth registration form (#15014) 2021-03-17 04:54:02 +01:00
KN4CK3RandGitHub 7019076f7f Fixed wrong migrate url error description. (#15010) 2021-03-17 03:34:09 +01:00
GiteaBot 5bb544e3ae [skip ci] Updated translations via Crowdin 2021-03-17 00:12:36 +00:00
d2dc182dcd 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 <[email protected]>
Co-authored-by: zeripath <[email protected]>
2021-03-16 15:42:25 +00:00
Patrick SchratzandGitHub ab70b2f4e4 add pat-s to MAINTAINERS list (#15007) 2021-03-16 14:37:04 +00:00
zeripathandGitHub bf53cf0e04 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 <[email protected]>
2021-03-16 02:36:34 +01:00
NorwinandGitHub f4629fc472 Move repo.CloseIssuesViaCommitInAnyBranch to issue settings (#14965) 2021-03-16 02:00:52 +01:00
GiteaBot ad42adac93 [skip ci] Updated translations via Crowdin 2021-03-16 00:12:50 +00:00
ed31ddc29a 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 <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2021-03-16 00:20:05 +01:00
044cd4d016 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 <[email protected]>
2021-03-16 00:27:28 +02:00
6e423d5573 Ensure validation occurs on clone addresses too (#14994)
* Ensure validation occurs on clone addresses too

Fix #14984

Signed-off-by: Andrew Thornton <[email protected]>

* fix lint

Signed-off-by: Andrew Thornton <[email protected]>

* fix test

Signed-off-by: Andrew Thornton <[email protected]>

* Fix api tests

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
2021-03-15 17:52:11 -04:00
tuxmaster5000andGitHub f268b4896b Update comparison docs for gitlab (#14999) 2021-03-15 11:19:00 -04:00
1ae9b2a89b Update go-enry to v2.6.1 (#14997)
Co-authored-by: Gitea <[email protected]>
2021-03-15 04:20:02 +01:00
5f8478ab0a Fix repo page language stat span color (#14993)
Co-authored-by: Lauris BH <[email protected]>
2021-03-14 22:27:58 +02:00
Bo-Yi WuandGitHub 167b0f46ef chore(models): rewrite code format. (#14754)
* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.
2021-03-14 19:52:12 +01:00
zeripathandGitHub 164e35ead3 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 <[email protected]>
2021-03-14 16:36:51 +00:00
zeripathandGitHub 6463483ec5 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 <[email protected]>
2021-03-14 15:53:59 +00:00
Mike LandGitHub 9566c9f0c7 Re-enable listing of forks when logged out (#14992)
* Re-enable listing of forks when logged out

* Further improvements on repo button logic
2021-03-14 14:48:28 +00:00
GiteaBot f5aaa74b90 [skip ci] Updated licenses and gitignores 2021-03-14 00:12:26 +00:00
658d1bfac8 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 <[email protected]>
2021-03-13 19:06:52 +01:00