aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid setting the CONN_STR in issue indexer queue unless it is meant to be ↵zeripath2020-10-071-1/+1
| | | | | | | | | | | | | | | set (#13069) Since the move to common leveldb and common redis the disk queue code (#12385) will check the connection string before defaulting to the DATADIR. Therefore we should ensure that the connection string is kept empty unless it is actually set. Unforunately the issue indexer was missed in #13025 this PR fixes this omission Fix #13062 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Gitea serv, hooks, manager and the like should always display Fatals (#13032)zeripath2020-10-071-0/+2
| | | | | | | | | | | | | | | | | The gitea cmd/serv.go setup function deletes the console logger to prevent stdout interference with commands. However, the problem is that it then calls setting.NewContext which may cause an exit with log.Fatal - which will then not be shown. Now, log.Fatal is so disastrous that the interference that logging causes is wanted. However, we can avoid stdout interference by emitting on stderr. This PR forces the creation of a console logger on stderr listening on Fatal for these commands. Most commands have a `--debug` option now that will print more reasons too - however, defaulting to give the log for Fatal seems reasonable. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-0714-14/+4
|
* Disable Git Hooks by default (#13064)techknowlogick2020-10-076-4/+9
| | | | | | | * Disable Git Hooks by default Related #13058 * pass tests
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-072-21/+50
|
* Mitigate Security vulnerability in the git hook feature (#13058)Niklas Goerke2020-10-073-5/+15
| | | | | | | | | | | | | * Extend git hook warning in the UI. Git hooks are a dangerous feature, administrators should be warned before giving the git hook privilege to users. * Disable Git hooks by default and add warning. Git hooks are a dangerous features (see warning text) that should only be enabled if the administrator was informed about the risk involved. Co-authored-by: Niklas Goerke <goerke@fzi.de>
* Update third-party-tools.en-us.md (#13046)Rongjian Zhang2020-10-061-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-064-6/+61
|
* fix: case typo (#13049)Rongjian Zhang2020-10-062-9/+9
| | | | | * Update settings.go * Run swagger generate
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-062-2/+37
|
* [Docs] Update GitNex Link (#13050)65432020-10-061-3/+3
|
* Adding visual cue for "Limited" & "Private" organizations. (#13040)Spencer Taylor2020-10-066-2/+31
| | | | | | | | * Adding visual cue for "Limited" & "Private" organizations. * Moving org visibility CSS styles to .less files. Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix error create comment on outdated file (#13041)65432020-10-051-1/+4
| | | | | | | * FIX * more specific Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix Pull Request merge buttons on mobile (#13035)kolaente2020-10-051-0/+10
| | | | | Signed-off-by: kolaente <k@knt.li> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-054-1/+85
|
* Fix Issue & Pull Request comment headers on mobile (#13039)kolaente2020-10-051-9/+12
| | | Signed-off-by: kolaente <k@knt.li>
* (Re)Load issue labels when changing them (#13007)zeripath2020-10-052-0/+20
| | | | | | | | | | (Re)Load issue labels when labels are added or removed This means that the label state that the webhooks produce accurately matches the changes that they are reporting. Fix #10660 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Attachments: Add extension support, allow all types for releases (#12465)silverwind2020-10-0526-226/+497
| | | | | | | | | | | | | | | | | | | | | * Attachments: Add extension support, allow all types for releases - Add support for file extensions, matching the `accept` attribute of `<input type="file">` - Add support for type wildcard mime types, e.g. `image/*` - Create repository.release.ALLOWED_TYPES setting (default unrestricted) - Change default for attachment.ALLOWED_TYPES to a list of extensions - Split out POST /attachments into two endpoints for issue/pr and releases to prevent circumvention of allowed types check Fixes: https://github.com/go-gitea/gitea/pull/10172 Fixes: https://github.com/go-gitea/gitea/issues/7266 Fixes: https://github.com/go-gitea/gitea/pull/12460 Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers * rename function * extract GET routes out of RepoMustNotBeArchived Co-authored-by: Lauris BH <lauris@nix.lv>
* [#13004] Add Timestamp to Tag list API (#13026)Lucas Queiroz2020-10-054-2/+62
| | | | | | | | | * Add Timestamp to Tag list API * Add unit test for ToCommitMeta * Rename timestamp to created * Reformat files
* updated docs with caveat for authorized_keys (#13030)Divyam Bhasin2020-10-041-1/+20
| | | | | | | * updated docs with caveat for authorized_keys * wrapped authorized_keys in ticks Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Return sample message for login error in api context (#12994)赵智超2020-10-041-3/+23
| | | | | | | | | | | | | | | | | | | | | | * Return sample message for login error in api context Signed-off-by: a1012112796 <1012112796@qq.com> * Update modules/context/auth.go Co-authored-by: silverwind <me@silverwind.io> * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* CSS tweaks to warning/error segments and misc fixes (#13024)silverwind2020-10-045-17/+61
| | | | | | | | | | | | | | | | * CSS tweaks to warning/error segments and misc fixes - Adjust styling for warning/error in arc-green - Change danger boxes from orange to red - Fix code highlight text color in arc-green - Fix warning message in arc-green - Fix border in org member list in arc-green - Fix disabled checkbox text in arc-green * use same selector in gitea theme * fix blame highlight Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-041-18/+86
|
* Avoid setitng the CONN_STR in queues unless it is meant to be set (#13025)zeripath2020-10-042-3/+3
| | | | | | | | | | | Since the move to common leveldb and common redis the disk queue code will check the connection string before defaulting to the DATADIR. Therefore we should ensure that the connection string is kept empty unless it is actually set. Fix #13023 Signed-off-by: Andrew Thornton <art27@cantab.net>
* hCaptcha Support (#12594)John Olheiser2020-10-0225-20/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work on hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use module Signed-off-by: jolheiser <john.olheiser@gmail.com> * Format Signed-off-by: jolheiser <john.olheiser@gmail.com> * At least return and debug log a captcha error Signed-off-by: jolheiser <john.olheiser@gmail.com> * Pass context to hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add context to recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * fix lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Finish hcaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update example config Signed-off-by: jolheiser <john.olheiser@gmail.com> * Apply error fix for recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change recaptcha ChallengeTS to string Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix formatting of branches ahead-behind on narrow windows (#12989)zeripath2020-10-021-1/+2
| | | | | | | | | | Make the bar-groups width 50% with max-width of 90px Fix #12252 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update comparison for GitLab CE (#13019)Claudius Ellsel2020-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Update comparison for GitLab CE Fixes #13018. * Update docs/content/doc/features/comparison.en-us.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update comparison.en-us.md According to the linked issue it is there and just the documentation is lacking. * Update docs/content/doc/features/comparison.en-us.md Co-authored-by: techknowlogick <matti@mdranta.net> * Update docs/content/doc/features/comparison.en-us.md Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix comment header span. (#13009)rebeckanylander2020-10-021-10/+10
| | | | | Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove code-view class from diff view (#13011)mrsdizzie2020-10-022-1/+2
| | | | | | | | code-view class seems unecessary here as everything needed style wise comes from various diff classes. This allows comments and comment editor to be styled properly and fixes linked bug. Fixes #13010 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix 500 on README in submodule (#13006)zeripath2020-10-021-0/+11
| | | | | | | | | | | | | If a README file is a symlink to a submodule Gitea the view branch page will return a 500. The underlying problem is a missed conversion of an plumbing.ErrObjectNotFound in git/tree_blob.go. Fix #12599 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-021-6/+36
|
* Fix repository create/delete event webhooks (#13008)James Lakin2020-10-022-23/+17
| | | | | | | | | | | This small PR changes the webhook trigger behaviour to be more in line with what's expected. (When 'repository' events are enabled, of course) In other words: For system-wide or default webhooks, repository events will now trigger said webhook. Previously it had to be under an organization for create events to be visible - a tad unexpected! Deleting a repository will now fire its own defined webhooks, not just organisational and system ones. In order to enable the latter the webhook has to now be triggered before the actual repo undergoes deletion. I'm willing to tweak this to try and 'grab' the webhook model beforehand and trigger the webhook notifier directly afterwards, but this may make the code more complex for little benefit. Closes #11766, #9180.
* latest version is 1.12.5 (#13005)techknowlogick2020-10-011-1/+1
|
* Changelog 1.12.5 (#13002) (#13003)John Olheiser2020-10-011-0/+27
| | | | | | | | | | | | | | | | | | | * Changelog 1.12.5 Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: techknowlogick <matti@mdranta.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* fix: media links in org files not liked to media files (#12997)Pranav Nachnekar2020-10-011-3/+17
| | | | | | | | | | | * fix: media links in org files not liked to media files * fix: write directly to io.Writer r as suggested by code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-0125-25/+0
|
* allow U2F with default settings for gitea in subpath (#12990)techknowlogick2020-10-011-1/+1
| | | | | | | * allow U2F with default settings for gitea in subpath * use trim suffix Co-authored-by: zeripath <art27@cantab.net>
* Copy missing things from app.example.ini to Cheat Sheet (#12988)zeripath2020-10-013-23/+103
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-011-1/+1
|
* Refactor use TrimSuffix instead of TrimRight (#12993)65432020-10-013-3/+3
| | | | | | | * Refactor use TrimSuffix instead of TrimRight * TrimRight right * has #12990
* [skip ci] Updated translations via CrowdinGiteaBot2020-09-301-16/+25
|
* Fix hugo shortcode typo in faq (#12987)raoulb2020-09-302-1/+1
| | | | | * Fix hugo shortcode typo in faq * Switch to using language tags
* [skip ci] Updated translations via CrowdinGiteaBot2020-09-301-1/+1
|
* Clarification on the use of certificate chains (#12986)PE1NUT2020-09-302-2/+2
| | | | | | | | | | | * Clarification on the use of certificate chains * As per @bagasme Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-09-301-0/+1
|
* Fix typo on Chinese documents (#12982)Lunny Xiao2020-09-301-1/+1
|
* Always return a list from GetCommitsFromIDs (#12981)zeripath2020-09-291-4/+0
| | | | | | | | | | `GetCommitsFromIDs` is only used in one place: `LoadPushCommits` where it expects that `c.Commits` is not nil. This potentially nil set causes a NPE in in #12953 Fix #12953 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Only set the user password if the password field would have been shown (#12980)zeripath2020-09-291-1/+1
| | | | | | | | | POSTing to /admin/users/:id should only set the password if the the user IsLocal or IsOauth2 Fix #12952 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-09-292-2/+20
|
* Fix admin/config page (#12979)zeripath2020-09-291-1/+1
| | | | | | | Change `.LFS.ContentPath` to `.LFS.Path` Fix #12975 Signed-off-by: Andrew Thornton <art27@cantab.net>