summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the implementation of the go-git version of GetNote to mirror the non ↵nitul19912021-08-092-0/+15
| | | | | | | go-git version when passed a non-existent commit (#16658) (#16659) Backport #16658 Fixes #16657
* Fix direct creation of external users on admin page (#16613)zeripath2021-08-091-1/+3
| | | | | | From #16612 it was noticed that when creating new external users directly it was not possible to set their username correctly. This PR restores this ability. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Restore compatibility with SQLServer 2008 R2 in migrations (#16638)zeripath2021-08-081-6/+3
| | | | | | | | | | | | | | | | This fixes two problems with MSSQL: * `ALTER TABLE DROP ... IF EXISTS ...` is only supported in SQL Server >16. The `IF EXISTS` here is a belt-and-braces and does not need to be present. Therefore can be dropped. Also stop attempting to drop the indexes as constraints as they're indexes! * System tables like: `sys.indexes` should be lowercase not uppercase because of collation issues. Fix #13615 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Changelog for 1.15.0-rc3 (#16621)v1.15.0-rc3zeripath2021-08-061-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changelog for 1.15.0-rc3 ## [1.15.0-rc3](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc3) - 2021-08-04 * BREAKING * Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606) * SECURITY * Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606) * Switch to maintained jwt lib (#16532) (#16533) * Correctly create of git-daemon-export-ok files (#16508) (#16514) * Don't show private user's repo in explore view (#16550) (#16554) * API * Swagger AccessToken fixes (#16574) (#16597) * Set AllowedHeaders on API CORS handler (#16524) (#16618) * BUGFIXES * Restore Accessibility for Dropdown (#16576) (#16617) * Pass down SignedUserName down to AccessLogger context (#16605) (#16616) * Fix table alignment in markdown (#16596) (#16602) * Fix 500 on first wiki page (#16586) (#16598) * Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570) * Upgrade levelqueue to v0.4.0 (#16560) (#16561) * Handle too long PR titles correctly (#16517) (#16549) * Fix data race in bleve indexer (#16474) (#16509) * Restore CORS on git smart http protocol (#16496) (#16506) * Fix race in log (#16490) (#16505) * Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498) * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480) * Update notification table with only latest data (#16445) (#16469) * Revert to use alpine 3.13 (#16451) (#16452) * Fix crash following ldap authentication update (#16447) (#16448) * Fix direct creation of external users on admin page (partial #16612) (#16613) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update CHANGELOG.md Co-authored-by: techknowlogick <techknowlogick@gitea.io> * Update CHANGELOG.md Co-authored-by: zeripath <art27@cantab.net> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent 500 on draft releases without tag (#16634) (#16636)techknowlogick2021-08-061-1/+3
| | | | | | | | | | | | | | | | It is possible to create draft releases prior to creating a tag. This will cause a 500 on the releases page due to compare page failing. This PR only shows the compare button if there is a SHA1 present. Fix #16610 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Frontport changelog for v1.14.6 (#16633)zeripath2021-08-062-1/+11
| | | | | | | | | | | | | * Frontport changelog for v1.14.6 Frontport #16619 Changelog frontported to below v1.15.0-rc1. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update config.yaml Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update node tar dependency to 6.1.6 (#16622) (#16623)zeripath2021-08-051-6/+6
| | | | | | | | | Backport #16622 Forcibly update dev dependency on tar to 6.1.6 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Set AllowedHeaders on API CORS handler (#16524) (#16618)zeripath2021-08-042-0/+2
| | | | | | | | | | Backport #16524 Set AllowedHeaders on API CORS handler and add missing Access-Control-Expose-Headers to pull API. Fix #16100 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Pass down SignedUserName down to AccessLogger context (#16605) (#16616)zeripath2021-08-043-4/+28
| | | | | | | | | | | | | | | | Backport #16605 Unfortunately when the AccessLogger was moved back before the contexters the SignedUserName reporting was lost. This is due to Request.WithContext leading to a shallow copy of the Request and the modules/context/Context being within that request. This PR adds a new context variable of a string pointer which is set and handled in the contexters. Fix #16600 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Restore #10096/#8638 and re-fix #15172 (#16576) (#16617)zeripath2021-08-045-10/+4450
| | | | | | | | | | | | | | | | | | | Backport #16576 This PR restores the vendored and patched dropdow from #8638. It however, it partially abandons the call to `click()` using instead the default dropdown click calls instead. This prevents the issue of the dropdown grabbing focus permanently however, this may have negative effects on the effect of focus on the dropdowns. Of note, the behaviour of the template selector dropdown on the repo creation page is slightly odd - I don't believe that this odd behaviour is caused by this PR but rather by the feed source for this. I suspect that the dropdown should be adding a delete button to its selection. Fix #15172 References: #7057 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix table alignment in markdown (#16596) (#16602)zeripath2021-08-041-1/+3
| | | | | | | | | | Backport #16596 Set the TableOptions in markdown to allow alignment of the tables to work correctly Fix #15959 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix 500 on first wiki page (#16586) (#16598)zeripath2021-08-032-0/+32
| | | | | | | | | | | | | | Backport #16586 There is a mistake in #16319 and #16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix #16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Upgrade to the latest version of golang-jwt (#16590) (#16606)zeripath2021-08-0314-52/+203
| | | | | | | | | | | | | | | | | | | | | | | | * Upgrade to the latest version of golang-jwt. Backport #16590 * Forcibly update the vendored versions too * Update our minimal go lang version to 1.15 (differs from 1.16 in #16590) Signed-off-by: Andrew Thornton <art27@cantab.net> ### :warning: BREAKING :warning: This PR raises the minimal version of go supported to 1.15 which will mean the end of support of 32-bit Mac and Mac OS versions before Sierra. Signed-off-by: Andrew Thornton <art27@cantab.net> * update minimal go required Signed-off-by: Andrew Thornton <art27@cantab.net> * update config.yaml Signed-off-by: Andrew Thornton <art27@cantab.net>
* Swagger AccessToken fixes (#16574) (#16597)zeripath2021-08-024-31/+27
| | | | | | | | | | | | | | | Backport #16574 There is a subtle problem with the Swagger definition for AccessTokens which causes autogeneration of APIs for these endpoints to fail. This PR corrects these errors. Ref: https://github.com/zeripath/java-gitea-api/issues/4 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [CI] Use node v14 instead of node v16 until it will pass again (#16595) (#16599)65432021-08-021-7/+7
| | | | | * for CI release: use node 14 (lts) to build until 16 do fail * all in for node v14.x
* Lock goth/gothic and Re-attempt OAuth2 registration on login if registration ↵zeripath2021-07-292-5/+21
| | | | | | | | | | | | | | | | | | | | failed at startup (#16570) Backport #16564 This PR has two parts: * Add locking to goth and gothic calls with a RWMutex The goth and gothic calls are currently unlocked and thus are a cause of multiple potential races * Reattempt OAuth2 registration on login if registration failed If OAuth2 registration fails at startup we currently disable the login_source however an alternative approach could be to reattempt registration on login attempt. Fix #16096 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Upgrade levelqueue to v0.4.0 (#16560) (#16561)Lunny Xiao2021-07-276-2/+13
| | | Fix #16546
* not show private user's repo in explore view (#16550) (#16554)a10121127962021-07-271-5/+3
| | | | | | after #16069, visibility is also usefull for user, so this limit is not usefull. fix #16545
* Fix session bugs (#16552) (#16553)65432021-07-273-17/+47
| | | | | | | | | | | | | | | * Fix session bugs (#16552) * fix deadlog bug * Fix models/issue_stopwatch.go * Update models/issue_stopwatch.go Co-authored-by: zeripath <art27@cantab.net> * fix getLatestCommitStatus Co-authored-by: zeripath <art27@cantab.net>
* Handle too long PR titles correctly (#16517) (#16549)zeripath2021-07-264-4/+64
| | | | | | | | | | | | | | | | Backport #16517 The CompareAndPullRequestPost handler for POST to /compare incorrectly handles returning errors to the user. For a start it does not set the necessary markers to switch SimpleMDE but it also does not immediately return to the form. This PR fixes this by setting the appropriate values, fixing the templates and preventing the suggestion of a too long title. Fix #16507 Signed-off-by: Andrew Thornton <art27@cantab.net>
* upgraded github.com/markbates/goth v1.67.1 => v1.68.0 (#16539)65432021-07-246-25/+69
|
* Fix issue pasted image missing if no release permission (#16520) (#16527)Lunny Xiao2021-07-241-1/+6
| | | | | | | * Fix issue pasted image missing if no release permission Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Switch to maintained jwt lib (#16532) (#16533)zeripath2021-07-2430-171/+153
| | | | | Backport #16532 Co-authored-by: Matti R <matti@mdranta.net>
* Add basic edit ldap auth test & actually fix #16252 (#16465) (#16494)v1.15.0-rc2zeripath2021-07-223-13/+87
| | | | | | | | | | | | | | | | | | | | | | Backport #16465 One of the reasons why #16447 was needed and why #16268 was needed in the first place was because it appears that editing ldap configuration doesn't get tested. This PR therefore adds a basic test that will run the edit pipeline. In doing so it's now clear that #16447 and #16268 aren't actually solving #16252. It turns out that what actually happens is that is that the bytes are actually double encoded. This PR now changes the json unmarshal wrapper to handle this double encode. Fix #16252 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Restore creation of git-daemon-export-ok files (#16508) (#16514)zeripath2021-07-222-2/+86
| | | | | | | | | | | | | | | Backport #16508 Somewhere along the line the creation of git-daemon-export-ok files disappeared but the updating of these files when repo visibility changes remained. The problem is that the current state will create files even when the org or user is private. This PR restores creation correctly. Fix #15521 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog for 1.15.0-rc2 (#16511)zeripath2021-07-221-0/+13
| | | | | | | | | | | | | | | | * Changelog for 1.15.0-rc2 Results of `~/go/bin/changelog -m 1.15.0 --after 16422 generate` We need to release RC2 as there are mulitple problems with alpine 3.14 related to the seccomp issues on Docker <20. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update CHANGELOG.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix data race in bleve indexer (#16474) (#16509)65432021-07-223-6/+69
| | | | | * Fix data race in bleve indexer Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Restore CORS on git smart http protocol (#16496) (#16506)zeripath2021-07-212-11/+31
| | | | | | | | | | | | | | | | | | | Backport #16496 Unfortunately the chi changes have resulted in the CORS headers for the git smart http protocol going missing. This is mostly because the OPTIONS method is not being handled by httpBase anymore. This PR adds a GetOptions, PostOptions and Options methods to web handler to allow OPTIONS method requests to still reach the httpBase function. Fix #16350 Close #16491 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix race in log (#16490) (#16505)zeripath2021-07-212-27/+30
| | | | | | | | | Backport #16490 A race has been detected in #1441 relating to getting log levels. This PR protects the GetLevel and GetStacktraceLevel calls with a RW mutex. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add TestPrepareWikiFileName (#16487) (#16498)65432021-07-217-4/+76
| | | | | | | | | * Add TestPrepareWikiFileName * use LsTree as LsFiles is index only * ajust other tests Co-authored-by: Andrew Thornton <art27@cantab.net>
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to ↵zeripath2021-07-202-2/+34
| | | | | | | | | | | end (#16479) (#16480) * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) Fix #16427 (again!) * handle sharing violation error code Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix: support delete non-urlencoded wiki page (#16482) (#16486)Gary Wang2021-07-191-8/+3
| | | | | * fix: support delete non-urlencoded wiki page * fix: check error
* Update notification table with only latest data (#16445) (#16469)zeripath2021-07-173-5/+15
| | | | | | | | When marking notifications read the results may be returned out of order or be delayed. This PR sends a sequence number to gitea so that the browser can ensure that only the results of the latest notification change are shown. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Retry rename on lock induced failures (re-fix) (#16461) (#16462)zeripath2021-07-161-1/+1
| | | | | | | | | | Backport #16461 Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Frontport v1.14.5 (#16453)zeripath2021-07-161-0/+12
| | | | | | | Frontport the changelog from v1.14.5 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* revert to use alpine 3.13 (#16452)techknowlogick2021-07-163-5/+5
| | | Co-authored-by: zeripath <art27@cantab.net>
* Fix crash following ldap authentication update (#16447) (#16448)zeripath2021-07-151-2/+2
| | | | | | | | | | | Backport #16447 Unfortunately #16268 contained a terrible error, whereby there was a double indirection taken when unmarshalling the source data. This fatally breaks authentication configuration reading. Fix #16342 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update documentation to reflect #15219 (#16442) (#16444)zeripath2021-07-154-10/+10
| | | | | | | | | | Backport #16442 The move to render custom/public as within /assets in #15219 missed updating several documentation pages. This PR updates this documentation. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog for v1.15.0-rc1 (#16422)v1.15.0-rc165432021-07-152-8/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changelog -m 1.15.0 generate * enhance changelog * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * move SECURITY before FEATURES * move ENHANCEMENTS above BUGFIXES * as per techknowlogick * more * node16 * Apply suggestions from code review Co-authored-by: Kyle D. <kdumontnu@gmail.com> * next * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: Norwin <noerw@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Kyle D. <kdumontnu@gmail.com> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Retry rename on lock induced failures (#16435)zeripath2021-07-158-14/+42
| | | | | | | | | | | | | | | | | | * Retry rename on lock induced failures Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix #16427 Signed-off-by: Andrew Thornton <art27@cantab.net> * resolve CI fail Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+3
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+8
|
* add note about minimum required version of git installed (#16433)techknowlogick2021-07-141-0/+2
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-141-22/+22
|
* Change the release cycle to match actual situations (#16430)Lunny Xiao2021-07-141-6/+8
| | | | | | | | * Change the release cycle to match actual situations * Update CONTRIBUTING.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Change docker tag logic (#16421)techknowlogick2021-07-145-24/+197
| | | | | | | | | | | | | * Change docker logic * Apply suggestions from code review Co-authored-by: Kyle D. <kdumontnu@gmail.com> * docs Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-141-0/+15
|
* Second attempt at preventing zombies (#16326)zeripath2021-07-1421-143/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Second attempt at preventing zombies * Ensure that the pipes are closed in ssh.go * Ensure that a cancellable context is passed up in cmd/* http requests * Make cmd.fail return properly so defers are obeyed * Ensure that something is sent to stdout in case of blocks here Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint 2 Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint 3 Signed-off-by: Andrew Thornton <art27@cantab.net> * fixup Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-148-11/+4
|