summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Ensure memcache TTL cannot be over 30 days (#14592)zeripath2021-02-097-10/+29
| | | | | | | | | | Memcached TTL cannot be > 30 days and if it is attempted the TTL is interpreted as a unix timestamp. This PR ensures that the TTL is switched to a unix timestamp in those cases. Fix #14571 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Truncated organisations name #14583 (#14615)vnkmpf2021-02-0911-28/+39
| | | | | - truncate to max length 40 - add CSS ellipsis
* Add support for ref parameter to get raw file API (#14602)zeripath2021-02-092-1/+27
| | | | | | | | Fix #14597 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fixed irritating error message related to go version (#14611)uli-heller2021-02-081-1/+1
| | | | | | | | | I do have go-1.13.8 installed and get the error message ``` Gitea requires Go 1.13 or greater to build. You can get it at https://golang.org/dl/ ``` I do thing that Go 1.14 or greater is actually required
* Use OldRef instead of CommitSHA for DeleteBranch comments (#14604)zeripath2021-02-084-6/+22
| | | | | | | | Fix #14545 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add information on how to build statically (#14594)zeripath2021-02-081-0/+8
| | | | | | | Fix #14576 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-081-0/+14
|
* Exclude the current dump file from the dump (#14606)zeripath2021-02-082-42/+25
| | | | | | | | | | | | | | | | | | | * Exclude the current dump file from the dump Always prevent the current file from being added to the dump. Fix #13618 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add skip custom directory option Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Remove spurious DataAsync Error logging (#14599)zeripath2021-02-071-3/+0
| | | | | | | Breaking the pipe is a valid way of killing a piped command and any error from a broken cat-file batch command should be passed back up to the writer any way therefore specifically logging it is unnecessary. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] Add delete release by tag & fix unreleased inconsistency (#14563)65432021-02-076-36/+157
| | | | | | | | | * DeleteReleaseByTag delete release not git tags * Add api to delete tag (without release) * fix & extend tests * fix swagger doc
* Fix rate limit bug when downloading assets on migrating from github (#14564)Lunny Xiao2021-02-071-0/+5
|
* [API] Add affected files of commits to commit struct (#14579)65432021-02-074-11/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add files affected by a commit to gitea API -- similar to github * Add files affected by a commit to gitea API * Fix stupid error * Fix other stupid typo * Generate swagger tmpl * Comply with convert to git commit refacto * update swagger docs * extend test * format code * Update integrations/api_repo_git_commits_test.go * Update modules/convert/git_commit.go Co-authored-by: Laurent Cahour <laurent.cahour@dont-nod.com> Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-02-071-0/+50
|
* Fix locale init (#14582)John Olheiser2021-02-051-2/+9
| | | | | | | just log if lang is already loaded since we can not reload it Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Add Content-Length header to HEAD requests (#14542)Farid AYOUJIL2021-02-052-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Content-Length header to HEAD requests This change adds the header Content-Length to HEAD HTTP requests. The previous behaviour was blocking some Windows executables (i.e bitsadmin.exe) from downloading files hosted in Gitea. This along with PR #14541, makes the web server compliant with HTTP RFC 2616 which states "The methods GET and HEAD MUST be supported by all general-purpose servers" and "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." This should also respond to issues #8030 and #14532. * This change adds the header Content-Length to HEAD HTTP requests Pass the Size of the content as a parameter to ServeData() instead of calculating it using ioutil.ReadAll(reader) --> this call is dangerous and can result in a denial of service. * Add Content-Length header to HEAD requests Quick fix for imported dependency not used. * Check if size is positiv int ... Co-authored-by: zeripath <art27@cantab.net>
* Honor REGISTER_MANUAL_CONFIRM when doing openid registration (#14548)Michel Ganguin2021-02-051-1/+1
| | | | | REGISTER_MANUAL_CONFIRM is not honored when doing performing an openid registration. The new account is directly accessible. With this patch, the manual confirm flag gets honored in the same way as a "normal" registration.
* Fix lfs file viewer (#14568)Lunny Xiao2021-02-051-21/+16
|
* Fix typo in generate-emoji.go (#14570)Ikko Ashimine2021-02-041-1/+1
| | | | | modifer -> modifier Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix bug about ListOptions and stars/watchers pagnation (#14556)Lunny Xiao2021-02-043-7/+11
| | | | | | | * Fix bug about ListOptions and stars/watchers pagnation * fix unit test Co-authored-by: 6543 <6543@obermui.de>
* Fix gpg key deletion (#14561)Anton Khimich2021-02-042-1/+15
| | | | | | | | | | | | | | | | | | | * Fix GPG key deletion when user is deleted Per #14531, deleting a user account will delete the user's GPG keys from the `gpg_key` table but not from `gpg_key_import`, which causes an error when creating an account with the same email and attempting to re-add the same key. This commit deletes all entries from `gpg_key_import` that match any GPG key IDs belonging to the user. * Format added code in models/user.go * Create a new function for listing GPG keys and apply it Create a new function `listGPGKeys` and replace a previous use of `ListGPGKeys`. Thanks to @6543 for the patch. Co-authored-by: Anton Khimich <anton.khimicha@mail.utoronto.ca> Co-authored-by: 6543 <6543@obermui.de>
* [API] GetRelease by tag only return release (#14397)Cameron Braid2021-02-042-4/+8
| | | | | get release by tag should filter out tag releases to be consistent with list releases and get by id Co-authored-by: 6543 <6543@obermui.de>
* Reduce data races (#14549)65432021-02-033-6/+18
| | | | | | | | | | | * Add race conditions into test * Fix Race in GetManager() * DataAsync() use error chan * just log no chan * finish
* [API] Add pagination to ListBranches (#14524)65432021-02-0320-87/+239
| | | | | | | | | | | | | | | | | | * make PaginateUserSlice generic -> PaginateSlice * Add pagination to ListBranches * add skip, limit to Repository.GetBranches() * Move routers/api/v1/utils/utils PaginateSlice -> modules/util/paginate.go * repo_module.GetBranches paginate * fix & rename & more logging * better description Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: a1012112796 <1012112796@qq.com>
* docs: update installation with-docker zh-cn (#14554)Howie Zhao2021-02-031-14/+313
|
* [Docs] Clone filters (#14555)Bagas Sanjaya2021-02-031-0/+65
| | | | | In summary: set uploadpack.allowfilter Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
* update docs to show latest stable version (1.13.2) (#14550)techknowlogick2021-02-031-1/+1
|
* Adding Chi's GetHead middleware (#14541)Farid AYOUJIL2021-02-021-1/+2
| | | | | | | | Before moving to Chi, HEAD requests were automatically answered by GET handlers (SetAutoHead(true) from macaron was used). This Change will restore the previous behaviour. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Changelog v1.13.2 (#14535) (#14543)65432021-02-021-0/+32
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-012-0/+11
|
* [API] List, Check, Add & delete endpoints for repository teams (#13630)65432021-02-014-0/+483
| | | | | | | * List, Check, Add & delete endpoints for repository teams * return units on single team responce too * Add Tests
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-012-1/+13
|
* rm redirect (#14534)65432021-02-013-7/+4
|
* Upgrade 'css-minimizer-webpack-plugin' to the latest version (#14527)Atilla Lonny2021-01-301-1/+1
| | | This patch resolves #14520
* Set the name Mapper in migrations (#14526)zeripath2021-01-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | Migrations currently uses the default Xorm mapper which is not the same as the mapper Gitea actually uses. This means that there is a difference between the struct parsing and mapping to database tables in migrations as compared to normal Sync2. This was the cause for the catastrophic problem in v168 - untagged fields are not mapped in the same way in migrations as compared to outside of migrations. This is also likely the cause of some weird subtle failures in other migrations as any untagged field may not be being mapped exactly the same way. This PR suggests that we ensure that the mapper is set at the start of the migrations code - but also enforces a strict clean mapper between each migration. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Internal ssh server respect Ciphers, MACs and KeyExchanges settings (#14523)Stefan2021-01-301-3/+7
|
* Move middlewares to web/middleware (#14480)Lunny Xiao2021-01-3026-126/+126
| | | Co-authored-by: 6543 <6543@obermui.de>
* Add Doctor FixWrongUserType (#14522)65432021-01-292-1/+51
| | | | | * Add Doctor FixWrongUserType * use NoAutoTime
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-2918-18/+0
|
* noop (#14521)John Olheiser2021-01-291-98/+3
| | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update docs and comments to remove macaron (#14491)Lunny Xiao2021-01-2929-78/+32
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-291-0/+2
|
* Fix json charset bug (#14514)Lunny Xiao2021-01-291-2/+2
|
* enhancement: add signoff option in commit form (#14516)a10121127962021-01-2911-8/+51
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix load time bug (#14508)Lunny Xiao2021-01-291-4/+10
|
* Fix missing locale bug introduced by #14429 (#14513)delvh2021-01-291-0/+1
| | | Fixes #14512
* [docs] Add zh-tw Translations (#14507)kevinlin182021-01-2921-70/+1107
|
* Fix migration v141 (#14387)65432021-01-283-1/+109
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix mig 141 * Add Migration to fix it * update null values to false first * Alter Table if posible * use dropTableColumns instead of recreateTable * MySQL use Alter * Postgres use Alter * Update models/migrations/v167.go * Apply suggestions from code review * use 2x add col & 2x update & 2x drop col * let sqlite be the only issue * use recreate since it just WORKS
* Extend TestUserOrgs to cover permission cases (#14495)65432021-01-281-11/+38
| | | | | * TestMyOrgs: add unauthorized test * Extend TestUserOrgs, to cover permission cases
* Add some Unit-Tests (#14500)65432021-01-286-9/+306
| | | | | | | | | | | * fix url * modules/auth/pa: coverage: 40#.0% * modules/base coverage: 67.6% -> 89.9% * modules/cache coverage: 0% -> 12.0% * modules/convert coverage: 27.1% -> 29.7%
* Vendor Update (#14496)65432021-01-28403-14240/+29620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update code.gitea.io/sdk/gitea v0.13.1 -> v0.13.2 * update github.com/go-swagger/go-swagger v0.25.0 -> v0.26.0 * update github.com/google/uuid v1.1.2 -> v1.2.0 * update github.com/klauspost/compress v1.11.3 -> v1.11.7 * update github.com/lib/pq 083382b7e6fc -> v1.9.0 * update github.com/markbates/goth v1.65.0 -> v1.66.1 * update github.com/mattn/go-sqlite3 v1.14.4 -> v1.14.6 * update github.com/mgechev/revive 246eac737dc7 -> v1.0.3 * update github.com/minio/minio-go/v7 v7.0.6 -> v7.0.7 * update github.com/niklasfasching/go-org v1.3.2 -> v1.4.0 * update github.com/olivere/elastic/v7 v7.0.21 -> v7.0.22 * update github.com/pquerna/otp v1.2.0 -> v1.3.0 * update github.com/xanzy/go-gitlab v0.39.0 -> v0.42.0 * update github.com/yuin/goldmark v1.2.1 -> v1.3.1