summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Issue sidebar and misc css fixes (#15524)silverwind2021-05-169-84/+92
| | | | | | | | | | | - Replace remaining font icons with SVG in issue sidebar - Rework issue due date display - Realign avatar in timeline - Fix font size in repo search and code explore - Consolidate active button styles - Fix loading form on arc-green - Align time tracker buttons vertically Fixes: https://github.com/go-gitea/gitea/issues/15896
* Use a special name for update default branch on repository setting (#15893)Lunny Xiao2021-05-162-1/+2
|
* Rework Token API comments (#15162)Ian Wienand2021-05-161-22/+36
| | | | | | | Move the token API discussion into a common section discussing the generation and listing of the tokens. Add a note on the display of the sha1 during creation and listing. Co-authored-by: Norwin <noerw@users.noreply.github.com>
* improve empty notice (#15890)Lunny Xiao2021-05-161-0/+5
|
* Systemd needs After as well as Require (#15881)zeripath2021-05-161-0/+9
| | | | | | | | | | | | If the gitea service is stopped because of the db going down it needs an `After=db.service` to ensure it is restarted in addition to the `Requires=db.service` to ensure that the db is started before gitea is started. Fix #15866 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-05-1619-3/+350
|
* Move sans-serif fallback font higher than emoji fonts (#15855)zeripath2021-05-161-1/+1
| | | | | | | | | | | | | | | | | The Tor browser does not use the system-ui font and no other fonts in the stack match its default fonts. In fact it is possible that it will in future only match generic fonts. This means that all rendering will first try the emoji fonts before falling back to the sans-serif font for glyphs. In this case has the emoji fall back fonts for Tor contains empty glyphs for numbers - in order to protect privacy - and leads to numbers being rendered as empty glyphs. This is clearly not ideal and whilst we could use the Arimo font - as I state above I suspect that Tor will eventually ban detecting this and we should instead move the sans-serif font higher in the stack so that it matches before the emoji fonts. Partial fix of #15844 Signed-off-by: Andrew Thornton <art27@cantab.net>
* GitHub: migrate draft releases too (#15884)65432021-05-152-34/+31
| | | | | * GitHub: migrate draft releases too * refactor
* Hold the event source when there are no listeners (#15725)zeripath2021-05-152-0/+35
| | | | | | | | | | * Hold the event source when there are no listeners The event source does not need to run when there are no listeners. Therefore pause it when there are none. * add some more logging Signed-off-by: Andrew Thornton <art27@cantab.net>
* Create a session on ReverseProxy and ensure that ReverseProxy users cannot ↵zeripath2021-05-152-7/+16
| | | | | | | | | | | | | | | change username (#15304) * Create a session on ReverseProxy and ensure that ReverseProxy users cannot change username ReverseProxy users should generate a session on reverse proxy username change. Also prevent ReverseProxy users from changing their username. Fix #2407 * add testcase Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent double-login for Git HTTP and LFS and simplify login (#15303)zeripath2021-05-1510-217/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent double-login for Git HTTP and LFS and simplify login There are a number of inconsistencies with our current methods for logging in for git and lfs. The first is that there is a double login process. This is particularly evident in 1.13 where there are no less than 4 hash checks for basic authentication due to the previous IsPasswordSet behaviour. This duplicated code had individual inconsistencies that were not helpful and caused confusion. This PR does the following: * Remove the specific login code from the git and lfs handlers except for the lfs special bearer token * Simplify the meaning of DisableBasicAuthentication to allow Token and Oauth2 sign-in. * The removal of the specific code from git and lfs means that these both now have the same login semantics and can - if not DisableBasicAuthentication - login from external services. Further it allows Oauth2 token authentication as per our standard mechanisms. * The change in the recovery handler prevents the service from re-attempting to login - primarily because this could easily cause a further panic and it is wasteful. * add test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* 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>