summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-281-1/+1
|
* Fix display since time round (#14226)Lunny Xiao2021-01-282-37/+152
| | | | | | | * Fix display since time round * Fix since time * Fix tests
* Fix JSON Header response (#14499)65432021-01-271-1/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-271-0/+2
|
* Fix access log (#14475)Lunny Xiao2021-01-2710-72/+129
| | | | | | Fix #14121, #14478. The `AccessLog` middleware has to be after `Contexter` or `APIContexter` so that we can get `LoginUserName` if possible. And also there is a **BREAK** change that it removed internal API access log.
* Use gitea.svg for public/img/gitea-gitea.svg instead of logo.svg (#14479)Kyle D2021-01-271-1/+1
|
* Fix captcha (#14488)Lunny Xiao2021-01-279-49/+30
| | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix switch language (#14484)Lunny Xiao2021-01-271-6/+4
| | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix: url.Values map was not initialized (#14485)PhilAtWysdom2021-01-271-0/+3
| | | | | Values map was not initialized, leading to error 500 on submission of initial configuration Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-271-0/+4
|
* Fix bug that username missed on issue list assignee filter (#14481)Lunny Xiao2021-01-271-2/+2
| | | Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-01-271-0/+1
|
* [Feature] add precise search type for Elastic Search (#12869)Jui-Nan Lin2021-01-2712-25/+77
| | | | | | | | * feat: add type query parameters for specifying precise search * feat: add select dropdown in search box Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Print usefull error if SQLite is used in settings but not supported (#14476)65432021-01-271-5/+8
| | | | | * move log output to points where they are relefant * check explicit of sqlite3 in settings