aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-121-4/+41
|
* Fix args in tasks.json (#13116)Elena Neuschild2020-10-121-8/+6
|
* Prohibit automatic downgrades (#13108)65432020-10-121-4/+9
| | | | | | | | Prohibit automatic downgrades by checking the version of the db and warning if the version number should be lower. Close #13107 Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
* Improve error feedback for duplicate deploy keys (#13112)Chris Shyi2020-10-123-1/+6
| | | | | | Instead of a generic HTTP 500 error page, a flash message is rendered with the deploy key page template to inform the user that a key with the intended title already exists. Fixes #13110
* chore: update minio image version (#13109)wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf2020-10-121-1/+1
| | | * 2020-05-16 --> 2020-10-09
* 4 line diff (#13103)65432020-10-121-3/+1
|
* Update golangci-lint to version 1.31.0 (#13102)kolaente2020-10-1123-41/+47
| | | | | | | This PR updates golangci-lint to the latest version 1.31.0. The upgrade introduced a new check for which I've fixed or disabled most cases. Signed-off-by: kolaente <k@knt.li>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-1126-48/+31
|
* Log the underlying panic in runMigrateTask (#13096)zeripath2020-10-111-7/+4
| | | | | | | | | | If there is a panic during runMigrateTask we should capture and log the underlying panic error. This PR ensures that the panic is logged and captured as part of the task message. Fix #13095 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add ssh certificate support (#12281)Wim2020-10-1015-28/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ssh certificate support * Add ssh certificate support to builtin ssh * Write trusted-user-ca-keys.pem based on configuration * Update app.example.ini * Update templates/user/settings/keys_principal.tmpl Co-authored-by: silverwind <me@silverwind.io> * Remove unused locale string * Update options/locale/locale_en-US.ini Co-authored-by: silverwind <me@silverwind.io> * Update options/locale/locale_en-US.ini Co-authored-by: silverwind <me@silverwind.io> * Update models/ssh_key.go Co-authored-by: silverwind <me@silverwind.io> * Add missing creation of SSH.Rootpath * Update cheatsheet, example and locale strings * Update models/ssh_key.go Co-authored-by: zeripath <art27@cantab.net> * Update models/ssh_key.go Co-authored-by: zeripath <art27@cantab.net> * Update models/ssh_key.go Co-authored-by: zeripath <art27@cantab.net> * Update models/ssh_key.go Co-authored-by: zeripath <art27@cantab.net> * Update models/ssh_key.go * Optimizations based on feedback * Validate CA keys for external sshd * Add filename option and change default filename Add a SSH_TRUSTED_USER_CA_KEYS_FILENAME option which default is RUN_USER/.ssh/gitea-trusted-user-ca-keys.pem Do not write a file when SSH_TRUSTED_USER_CA_KEYS is empty. Add some more documentation. * Remove unneeded principalkey functions * Add blank line * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> * Add SSH_AUTHORIZED_PRINCIPALS_ALLOW option This adds a SSH_AUTHORIZED_PRINCIPALS_ALLOW which is default email,username this means that users only can add the principals that match their email or username. To allow anything the admin need to set the option anything. This allows for a safe default in gitea which protects against malicious users using other user's prinicipals. (before that user could set it). This commit also has some small other fixes from the last code review. * Rewrite principal keys file on user deletion * Use correct rewrite method * Set correct AuthorizedPrincipalsBackup default setting * Rewrite principalsfile when adding principals * Add update authorized_principals option to admin dashboard * Handle non-primary emails Signed-off-by: Andrew Thornton <art27@cantab.net> * Add the command actually to the dashboard template * Update models/ssh_key.go Co-authored-by: silverwind <me@silverwind.io> * By default do not show principal options unless there are CA keys set or they are explicitly set Signed-off-by: Andrew Thornton <art27@cantab.net> * allow settings when enabled * Fix typos in TrustedUserCAKeys path * Allow every CASignatureAlgorithms algorithm As this depends on the content of TrustedUserCAKeys we should allow all signature algorithms as admins can choose the specific algorithm on their signing CA * Update models/ssh_key.go Co-authored-by: Lauris BH <lauris@nix.lv> * Fix linting issue Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix attachments list in edit comment (#13036)zeripath2020-10-116-20/+40
| | | | | | | | | | #11141 broke the appearance of dropzone attachments when editting comments causing poorly updating lists. This PR fixes this. Fix #12583 Signed-off-by: Andrew Thornton art27@cantab.net
* Fix deadlock when deleting team user (#13092)zeripath2020-10-101-1/+1
| | | | | | | | | | | `models.getUserRepoPermission(...)` calls `HasOrgVisible` which uses `models.x` potentially outside of the transaction `e` provided as an argument to `getUserRepoPermission`. This PR switches to use `hasOrgVisible(e, ...)`. Fix #12983 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Change default log configuration (#13088)zeripath2020-10-103-3/+52
| | | | | | | | | | | | | | | * Change default log configuration This PR changes the install page and the docker default logging configuration to match the suggested configuration that I repeatedly end up suggesting on issues. It further improves the logging configuration docs to recommend specific instructions for how to configure logs for posting to issues. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update docs/content/doc/advanced/logging-documentation.en-us.md
* Set appropriate `autocomplete` attributes on password fields (#13078)silverwind2020-10-0911-17/+17
| | | | | | | `new-password` prevents annoying autocompletion in some cases, thought it's not semantically correct to use that for example on all three fields on the user account page, so some annoyances remain. Co-authored-by: Lauris BH <lauris@nix.lv>
* Disable DSA ssh keys by default (#13056)zeripath2020-10-098-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disable DSA ssh keys by default OpenSSH has disabled DSA keys since version 7.0 As the docker runs openssh > v7.0 we should just disable DSA keys by default. Refers to #11417 Signed-off-by: Andrew Thornton <art27@cantab.net> * Just disable DSA keys by default Signed-off-by: Andrew Thornton <art27@cantab.net> * Appears we need to set the minimum key sizes too Signed-off-by: Andrew Thornton <art27@cantab.net> * Appears we need to set the minimum key sizes too Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove DSA type * Fix Tests Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix line break for MS teams webhook (#13081)Iván Valdés2020-10-091-1/+1
| | | | | Signed-off-by: Ivan Valdes <ivan@vald.es> Co-authored-by: Lauris BH <lauris@nix.lv>
* Improve Docker container name (#13077)Melroy van den Berg2020-10-081-5/+13
| | | | | | | | | | | * Improve Docker container name Use a better Docker container name than the default 'server' * Changing to gitea and use recommended v3 Docker-compose Use `gitea` as container name. And use version 3 of the docker-compose, which should now be used: https://docs.docker.com/compose/compose-file/compose-versioning/ Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Cache last commit when pushing for big repository (#10109)Lunny Xiao2020-10-094-11/+148
| | | | | | | | | | | | | | | | | | | | | | | | * Cache last commit when pushing for big repository * Fix bug * detect force push * Refactor cache push * Finish cache last commit info when push * Some improvements * Fix lint * Remove unused changes * Move pull request test before cache * Fix test mysql Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Hide sync ssh keys button on admin dashboard if ssh disabled or builtin-ssh ↵Lunny Xiao2020-10-082-0/+3
| | | | | enabled (#13072) Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-081-0/+1
|
* fix a small nit (#13074)赵智超2020-10-081-1/+1
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* 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>