10270 Commits (ea69ec6f0feb357b82dc2572f88184db507e383b)
 

Author SHA1 Message Date
zeripath ea69ec6f0f
Disable DSA ssh keys by default (#13056)
* 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>
4 years ago
Iván Valdés 06f1cdde6e
Fix line break for MS teams webhook (#13081)
Signed-off-by: Ivan Valdes <ivan@vald.es>

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Melroy van den Berg 508aca1cc0
Improve Docker container name (#13077)
* 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>
4 years ago
Lunny Xiao 9b81193166
Cache last commit when pushing for big repository (#10109)
* 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>
4 years ago
Lunny Xiao f06ee37e24
Hide sync ssh keys button on admin dashboard if ssh disabled or builtin-ssh enabled (#13072)
Co-authored-by: zeripath <art27@cantab.net>
4 years ago
GiteaBot 529c5ffe12 [skip ci] Updated translations via Crowdin 4 years ago
赵智超 a5ba8188da
fix a small nit (#13074)
Signed-off-by: a1012112796 <1012112796@qq.com>
4 years ago
zeripath 144fa5a537
Avoid setting the CONN_STR in issue indexer queue unless it is meant to be 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>
4 years ago
zeripath 1bf40ca0df
Gitea serv, hooks, manager and the like should always display Fatals (#13032)
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>
4 years ago
GiteaBot 4df6807b81 [skip ci] Updated translations via Crowdin 4 years ago
techknowlogick e00e8d8ad3
Disable Git Hooks by default (#13064)
* Disable Git Hooks by default

Related #13058

* pass tests
4 years ago
GiteaBot e0b7727804 [skip ci] Updated translations via Crowdin 4 years ago
Niklas Goerke 8fe8ab5cbf
Mitigate Security vulnerability in the git hook feature (#13058)
* 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>
4 years ago
Rongjian Zhang d49242287d
Update third-party-tools.en-us.md (#13046) 4 years ago
GiteaBot f5436b4a67 [skip ci] Updated translations via Crowdin 4 years ago
Rongjian Zhang 77f360b1b8
fix: case typo (#13049)
* Update settings.go

* Run swagger generate
4 years ago
GiteaBot a23c128ba6 [skip ci] Updated translations via Crowdin 4 years ago
6543 c584364b90
[Docs] Update GitNex Link (#13050) 4 years ago
Spencer Taylor 6eea301829
Adding visual cue for "Limited" & "Private" organizations. (#13040)
* 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>
4 years ago
6543 df4bbcd235
Fix error create comment on outdated file (#13041)
* FIX

* more specific

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
kolaente b5e76dddb8
Fix Pull Request merge buttons on mobile (#13035)
Signed-off-by: kolaente <k@knt.li>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
GiteaBot 91118bc73d [skip ci] Updated translations via Crowdin 4 years ago
kolaente 78aded1eaa
Fix Issue & Pull Request comment headers on mobile (#13039)
Signed-off-by: kolaente <k@knt.li>
4 years ago
zeripath 5e1c51cdb6
(Re)Load issue labels when changing them (#13007)
(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>
4 years ago
silverwind cda44750cb
Attachments: Add extension support, allow all types for releases (#12465)
* 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>
4 years ago
Lucas Queiroz 67a5573310
[#13004] Add Timestamp to Tag list API (#13026)
* Add Timestamp to Tag list API

* Add unit test for ToCommitMeta

* Rename timestamp to created

* Reformat files
4 years ago
Divyam Bhasin 48703c3c68
updated docs with caveat for authorized_keys (#13030)
* updated docs with caveat for authorized_keys

* wrapped authorized_keys in ticks

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
赵智超 01c7204895
Return sample message for login error in api context (#12994)
* 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>
4 years ago
silverwind 922d698842
CSS tweaks to warning/error segments and misc fixes (#13024)
* 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>
4 years ago
GiteaBot 10e04da28c [skip ci] Updated translations via Crowdin 4 years ago
zeripath 3f3a4f5b41
Avoid setitng the CONN_STR in queues unless it is meant to be set (#13025)
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>
4 years ago
John Olheiser 72636fd664
hCaptcha Support (#12594)
* 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>
4 years ago
zeripath 5460bf8903
Fix formatting of branches ahead-behind on narrow windows (#12989)
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>
4 years ago
Claudius Ellsel 45727c32c3
Update comparison for GitLab CE (#13019)
* 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>
4 years ago
rebeckanylander 54091e074c
Fix comment header span. (#13009)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
mrsdizzie 7a34fc0ae8
Remove code-view class from diff view (#13011)
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>
4 years ago
zeripath 54dd28f159
Fix 500 on README in submodule (#13006)
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>
4 years ago
GiteaBot 86b8c81240 [skip ci] Updated translations via Crowdin 4 years ago
James Lakin 6fc129fe62
Fix repository create/delete event webhooks (#13008)
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.
4 years ago
techknowlogick 77f3dbed6d
latest version is 1.12.5 (#13005) 4 years ago
John Olheiser b428f9feb5
Changelog 1.12.5 (#13002) (#13003)
* 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>
4 years ago
Pranav Nachnekar 1827f892de
fix: media links in org files not liked to media files (#12997)
* 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>
4 years ago
GiteaBot 1d2553abbf [skip ci] Updated translations via Crowdin 4 years ago
techknowlogick 156f54d6e2
allow U2F with default settings for gitea in subpath (#12990)
* allow U2F with default settings for gitea in subpath

* use trim suffix

Co-authored-by: zeripath <art27@cantab.net>
4 years ago
zeripath c6da033656
Copy missing things from app.example.ini to Cheat Sheet (#12988)
Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
GiteaBot 992f387139 [skip ci] Updated translations via Crowdin 4 years ago
6543 818d921bbb
Refactor use TrimSuffix instead of TrimRight (#12993)
* Refactor use TrimSuffix instead of TrimRight

* TrimRight right

* has #12990
4 years ago
GiteaBot 551473b294 [skip ci] Updated translations via Crowdin 4 years ago
raoulb a43cf283de
Fix hugo shortcode typo in faq (#12987)
* Fix hugo shortcode typo in faq

* Switch to using language tags
4 years ago
GiteaBot 7670a9db10 [skip ci] Updated translations via Crowdin 4 years ago