summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Restore CORS on git smart http protocol (#16496)zeripath2021-07-212-11/+31
| | | | | | | | | | | | | | | | | | 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> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix race in log (#16490)zeripath2021-07-202-27/+30
| | | | | | | | 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>
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to ↵zeripath2021-07-202-2/+34
| | | | | | | | | | | end (#16479) Fix #16427 (again!) * handle sharing violation error code Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add TestPrepareWikiFileName (#16487)65432021-07-207-4/+76
| | | | | | | | | * Add TestPrepareWikiFileName * use LsTree as LsFiles is index only * ajust other tests Co-authored-by: Andrew Thornton <art27@cantab.net>
* Add basic edit ldap auth test & actually fix #16252 (#16465)zeripath2021-07-203-13/+87
| | | | | | | | | | | | | | | | | | | | 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>
* Add fluid to ui container class to remove margin (#16396)Stanley Hu2021-07-202-2/+2
|
* fix: support delete non-urlencoded wiki page (#16482)Gary Wang2021-07-191-8/+3
| | | | | * fix: support delete non-urlencoded wiki page * fix: check error
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-1917-31/+16
|
* Fix data race in bleve indexer (#16474)Lunny Xiao2021-07-183-6/+69
| | | * Fix data race in bleve indexer
* docs: fix various typos and translate to french (#16477)Antoine Goutenoir2021-07-184-8/+7
| | | Co-authored-by: 6543 <6543@obermui.de>
* modules/markup/markdown: fix dropped test error (#16438)Lars Lehtonen2021-07-181-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-183-12/+27
|
* Improve 2FA autofill (#16473)Jonathan Herlin2021-07-181-1/+1
| | | This improves the autofill suggestion on mobile devices and some password managers
* show tag name on dashboard items list (#16466)a10121127962021-07-172-2/+2
| | | | | fix #16458 Signed-off-by: a1012112796 <1012112796@qq.com>
* CI: Add unit-test-race (#16470)65432021-07-171-0/+11
|
* Prevent race in TestPersistableChannelQueue (#16468)zeripath2021-07-172-6/+33
| | | | | | | | | | | | | * Prevent race in TestPersistableChannelQueue A slight race has become apparent in the TestPersistableChannelQueue. This PR simply adds locking to prevent the race. * make print value of "$(GOTESTFLAGS)" on test-backend and unit-test-coverage Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Update notification table with only latest data (#16445)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> Co-authored-by: 6543 <6543@obermui.de>
* Retry rename on lock induced failures (re-fix) (#16461)zeripath2021-07-161-1/+1
| | | | | | | | 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 (#16454)zeripath2021-07-162-1/+13
| | | | | | | | | | | | | | * Frontport v1.14.5 Frontport #16450 Frontport the changelog from v1.14.5 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update config.yaml Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Extend the fail2ban instructions with a hint on how to make X-Real-IP… ↵dosera2021-07-161-0/+9
| | | | | | | | | | | (#16446) Following the merging of #14959 - Gitea is a lot more strict regarding the interpretation of `X-Real-IP` and `X-Forwarded-For` headers. This PR updates the fail2ban documentation to include hints to set: `REVERSE_PROXY_TRUSTED_PROXIES` and `REVERSE_PROXY_LIMIT` appropriately. See discussion in #16443 Co-authored-by: zeripath <art27@cantab.net>
* revert to use alpine 3.13 (#16451)techknowlogick2021-07-163-5/+5
| | | Co-authored-by: zeripath <art27@cantab.net>
* Fix crash following ldap authentication update (#16447)zeripath2021-07-151-2/+2
| | | | | | | | | | | 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> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-161-17/+17
|
* cleanup code `issueFullPattern` in modules/markup (#16419)Josef Fröhle2021-07-152-7/+9
| | | fix #16415
* Update documentation to reflect #15219 (#16442)zeripath2021-07-154-10/+10
| | | | | | | | | 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>
* add configuration option to restrict users by default (#16256)Richard Nienaber2021-07-155-4/+34
| | | | | | | | | | | | | | | | | | * add configuration option to restrict users by default * default IsRestricted permission only set on sign up setting this in the model messes with other workflows (e.g. syncing LDAP users) where the IsRestricted permission needs to be explicitly set and not overridden by a config value * fix formatting * Apply suggestions from code review * ensure newly created user is set to restricted * ensure imports are in the correct order Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Check user instead of organization when creating a repo from a template via ↵Ion Jaureguialzo Sarasola2021-07-151-4/+9
| | | | | | | API (#16346) * Check user instead of organization * Enforce that only admins can copy a repo to another user
* microbadger is no more, rm from readme (#16440)techknowlogick2021-07-152-6/+0
| | | | | * microbadger is no more, rm from readme * Update README_ZH.md
* Change @every 24h default schedules to @midnight (#16431)v1.16.0-devJimmy Praet2021-07-154-23/+23
|
* 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
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-1423-36/+720
|
* Use TrN helper for email templates (#16425)65432021-07-145-6/+9
| | | | | | | * Add TrN helper * use TrN * a nit
* Make gpg resource string more readable (#16423)delvh2021-07-141-1/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-145-1/+79
|
* Fix activation of primary email addresses (#16385)Meano2021-07-135-49/+56
| | | | | | | | | | | | | | | | * fix: primary email cannot be activated * Primary email should be activated together with user account when 'RegisterEmailConfirm' is enabled. * To fix the existing error state. When 'RegisterEmailConfirm' is enabled, the admin should have permission to modify the activations status of user email. And the user should be allowed to send activation to primary email. * Only judge whether email is primary from email_address table. * Improve logging and refactor isEmailActive Co-authored-by: zeripath <art27@cantab.net>
* Return updated repository when changing repository using API (#16420)65432021-07-131-1/+7
|
* Load issue/PR context popup data only when needed (#15955)Lauris BH2021-07-133-55/+152
| | | | | | | * Load issue/PR context popup data only when needed * Add SVG icon Vue component * Remove unneeded check
* Support HTTP/2 in Let's Encrypt (#16371)Stanley Hu2021-07-132-1/+2
| | | | | Modify the tlsConfig.NextProtos for Let's Encrypt and built-in HTTPS server in order to support HTTP/2. Co-authored-by: 6543 <6543@obermui.de>
* fix calculation for finalPage in repo-search component (#16382)65432021-07-131-1/+1
| | | Co-authored-by: Jan Naahs <jan.naahs@naahstea.de>