summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow ↵zeripath2021-05-1524-412/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | level queue, reduce goroutines etc (#15693) * move shutdownfns, terminatefns and hammerfns out of separate goroutines Coalesce the shutdownfns etc into a list of functions that get run at shutdown rather then have them run at goroutines blocked on selects. This may help reduce the background select/poll load in certain configurations. * The LevelDB queues can actually wait on empty instead of polling Slight refactor to cause leveldb queues to wait on empty instead of polling. * Shutdown the shadow level queue once it is empty * Remove bytefifo additional goroutine for readToChan as it can just be run in run * Remove additional removeWorkers goroutine for workers * Simplify the AtShutdown and AtTerminate functions and add Channel Flusher * Add shutdown flusher to CUQ * move persistable channel shutdown stuff to Shutdown Fn * Ensure that UPCQ has the correct config * handle shutdown during the flushing * reduce risk of race between zeroBoost and addWorkers * prevent double shutdown Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix error message when saving generated LOCAL_ROOT_URL config (#15880)Naohisa Murakami2021-05-151-1/+1
|
* Fix blame row height alignment (#15863)Norwin2021-05-141-1/+5
| | | | | | | | | | | * fix blame row alignment on firefox * fix blame row alignment in chrome * fix blame row alignment in safari as per @silverwind Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-05-153-60/+63
|
* Close the gitrepo when deleting the repository (#15876)zeripath2021-05-144-0/+14
| | | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Upgrade xorm to v1.1.0 (#15869)Lunny Xiao2021-05-1455-423/+1294
|
* Fix bound address/port for caddy's certmagic library (see #15848) (#15859)Blake Miner2021-05-141-1/+6
|
* Fix LFS commit finder not working (#15856)KN4CK3R2021-05-143-9/+12
| | | | | | * Create a copy of the sha bytes. Co-authored-by: Andrew Thornton <art27@cantab.net>
* Add timeout to writing to responses (#15831)zeripath2021-05-141-0/+10
| | | | | | | | | | In #15826 it has become apparent that there are a few occasions when a response can hang during writing, and because there is no timeout go will happily just block interminably. This PR adds a fixed 5 second timeout to all writes to a connection. Fix #15826 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Stop calling WriteHeader in Write (#15862)zeripath2021-05-141-1/+1
| | | | | | | | | Fixes http: superfluous response.WriteHeader call from code.gitea.io/gitea/modules/context.(*Response).WriteHeader (response.go:67) * Looking again we don't need this writeHeader as all of our downstream implementations will always do it for us Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add jest rootDir and test-frontend dependency (#15860)silverwind2021-05-142-2/+3
| | | | | - Define jest rootDir to limit where it looks for test files - Add missing dependency on test-frontend target so it can be ran from a clean checkout
* reverse proxy for IIS (#15555)Jimmy2021-05-141-2/+25
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add information on how to rotate logging from outside container (#15852)zeripath2021-05-141-2/+3
| | | | | | | Fix #15842 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Only write config in environment-to-ini if there are changes (#15861)zeripath2021-05-141-3/+11
| | | | | | | | | | | | * Only write config in environment-to-ini if there are changes Only write the new config in environment-to-ini if there are changes or the destination is not the same as the customconf. Fix #15719 Fix #15857 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Restore PAM user autocreation functionality (#15825)zeripath2021-05-136-1/+24
| | | | | | | | | | | | | | | | | * Restore PAM user autocreation functionality PAM autoregistration of users currently fails due to email invalidity. This PR adds a new setting to PAM to allow an email domain to be set or just sets the email to the noreply address and if that fails falls back to uuid@localhost Fix #15702 Signed-off-by: Andrew Thornton <art27@cantab.net> * As per KN4CKER Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update JS dependencies, use Node 16 (#15804)silverwind2021-05-135-728/+1226
| | | | | | | | - Update all JS dependencies to latest version - Use Node 16 on CI - Add new lint rules - Add some gitignore entries for debug files Co-authored-by: Lauris BH <lauris@nix.lv>
* Only offer hostcertificates if they exist (#15849)zeripath2021-05-132-4/+24
| | | | | | | | | | | | | | | | | A common bug report is the otherwise harmless sshd logging: ``` Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory ``` This PR simply checks if these files exist before creation of sshd_config and if they do not exist, doesn't add a reference to them. Fix #14110 amongst others. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow custom highlight mapping beyond file extensions (#15808)mlpo2021-05-131-10/+17
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* fix truncate utf8 string (#15828)yan2021-05-132-4/+13
| | | | | * fix truncate utf8 string. * revoke truncated user info.
* [skip ci] Updated translations via CrowdinGiteaBot2021-05-131-11/+15
|
* Fix bound address/port for caddy's certmagic library (#15758)Blake Miner2021-05-121-0/+8
| | | | | | | | * Fix bound address/port for caddy's certmagic library * Fix bug Co-authored-by: zeripath <art27@cantab.net>
* change s3 bucket name (#15847)techknowlogick2021-05-121-3/+3
|
* Unregister non-matching serviceworkers (#15834)silverwind2021-05-125-30/+80
| | | | | | | | | | | | | | | * Unregister non-matching serviceworkers With the addition of the /assets url, users who visited a previous version of the site now may have two active service workers, one with the old scope `/` and one with scope `/assets`. This check for serviceworkers that do not match the current script path and unregisters them. Also included is a small refactor to publicpath.js which was simplified because AssetUrlPrefix is always present now. Also it makes use of the new joinPaths helper too. Fixes: https://github.com/go-gitea/gitea/pull/15823
* Upgrade unrolled/render to v1.1.1 (#15845)Lunny Xiao2021-05-124-13/+22
|
* Update README.md | Add translation section (#15830)Oymate2021-05-122-0/+15
| | | | | | | | | | | | | | | | * Update README.md * chinese translation Signed-off-by: a1012112796 <1012112796@qq.com> * Update README.md * Update README.md * Update README.md Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reaction improvements (#15836)silverwind2021-05-123-7/+17
| | | | | - Add some spacing to inline reactions - Adjust colors and add variables
* Tagger can be empty, as can Commit and Author - tolerate this (#15835)zeripath2021-05-123-8/+29
| | | | | | | | | | | | | | Unfortunately some old repositories can have tags with empty Tagger, Commit or Author. Go-Git variants will always have empty values for these whereas the native git variant leaves them at nil. The simplest solution is just to always have these set to empty Signatures. v156 migration also makes the incorrect assumption that these cannot be empty. Therefore add some handling to this and add logging and adjust broken logging elsewhere in this migration. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix individual tests (addition to #15802) (#15818)KN4CK3R2021-05-126-7/+33
| | | | | | | | | | | | | | | | | | | | * Decouple TestAction_GetRepoLink and TestSizedAvatarLink. * Load database for TestCheckGPGUserEmail. * Load database for TestMakeIDsFromAPIAssigneesToAdd. * Load database for TestGetUserIDsByNames and TestGetMaileableUsersByIDs. * Load database for TestUser_ToUser. * Load database for TestRepository_EditWikiPage. * Include AppSubURL in test. * Prevent panic with empty slice. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-05-1226-19/+71
|
* Queue manager FlushAll can loop rapidly - add delay (#15733)zeripath2021-05-121-6/+9
| | | | | | | | | | | | | * Queue manager FlushAll can loop rapidly - add delay Add delay within FlushAll to prevent rapid loop when workers are busy Signed-off-by: Andrew Thornton <art27@cantab.net> * as per lunny Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* label size, PR ref, new PR button alignment (#15363)Mike L2021-05-111-4/+4
| | | Co-authored-by: zeripath <art27@cantab.net>
* don't record error when loading ref comment but ref comment id is zero (#15820)Lunny Xiao2021-05-111-0/+3
|
* Set autocomplete off on branches selector (#15809)zeripath2021-05-111-1/+1
| | | | | | | Fix #15782 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* point appleboy/drone-git-push to use updated primary branchtechknowlogick2021-05-101-0/+2
|
* Add Active and ProhibitLogin to API (#15689)KN4CK3R2021-05-113-0/+16
| | | | | * Added active and prohibit_login. * Do not omit fields for normal users.
* Add mimetype mapping settings (#15133)Adam Szatyin2021-05-105-1/+58
| | | | | | | | | | | | | * Fix APK's Content-Type header * Fix case sensitive comparison * Add custom mime type mapping for downloadable files * Add documentation for MIME type mapping * Rename download.mimetype.mapping configuration to repository.mimetype_mapping Co-authored-by: zeripath <art27@cantab.net>
* Add err to log (#15813)John Olheiser2021-05-101-1/+1
| | | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* don't record error when request a non-exist user (#15819)Lunny Xiao2021-05-101-1/+1
| | | | | | | | | | * don't record error when request a non-exist user * Update routers/repo/http.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* add note about ``cron.SCHEDULE`` format in document (#15812)a10121127962021-05-103-0/+15
| | | | | | | | | | | | * add note about ``cron.SCHEDULE`` format in document Signed-off-by: a1012112796 <1012112796@qq.com> * Update custom/conf/app.example.ini Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix goth user infer bug (#15821)Lunny Xiao2021-05-101-5/+10
|
* Move restore repo to internal router and invoke from command to avoid open ↵Lunny Xiao2021-05-105-77/+164
| | | | | | | | | | | the same db file or queues files (#15790) * Move restore repo to internal router and invoke from command to avoid open the same db file or queues files * Follow @zeripath's review * set no timeout for resotre repo private request * make restore repo cancelable
* Use single shared random string generation function (#15741)silverwind2021-05-1015-191/+99
| | | | | | | | | | | | | | | | | | * Use single shared random string generation function - Replace 3 functions that do the same with 1 shared one - Use crypto/rand over math/rand for a stronger RNG - Output only alphanumerical for URL compatibilty Fixes: #15536 * use const string method * Update modules/avatar/avatar.go Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: a1012112796 <1012112796@qq.com>
* On open repository open common cat file batch and batch-check (#15667)zeripath2021-05-1026-161/+463
| | | | | | | Use common git cat-file --batch and git cat-file --batch-check to significantly reduce calls to git. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Return go-get info on subdirs (#15642)zeripath2021-05-093-65/+123
| | | | | | | | | | This PR is an alternative to #15628 and makes the go get handler a handler. Fix #15625 Close #15628 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Comment out app.example.ini (#15807)zeripath2021-05-091-1288/+2013
| | | | | | | | | | | | | | This PR is an alternative to #15559. Instead of deleting the app.example.ini - just comment out most of the thing. This makes it clear what needs to be set and what is completely optional - and keeps the documentation. The app.example.ini is moved around to move the most important settings higher in the document. Close #15559 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix incorrect asset URL (#15805)silverwind2021-05-092-2/+2
| | | | Fixes another regression from https://github.com/go-gitea/gitea/pull/15219.
* Respect default merge message syntax when parsing item references (#15772)Steven2021-05-092-1/+8
| | | | | | | * Respect merge message structure for parsing item references Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
* Add trace logging to SSO methods (#15803)zeripath2021-05-095-0/+20
| | | | | | It is currenly impossible to detect which "SSO" method is responsible for login. This PR adds some basic trace logging to these methods. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Tests should use test files (#15801)65432021-05-091-10/+5
|
* Allow only internal registration (#15795)65432021-05-099-8/+30
| | | | | * Add ALLOW_ONLY_INTERNAL_REGISTRATION into settings * OpenID respect setting too