summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Changelog for v1.15.7 (#17871)v1.15.7Lunny Xiao2021-12-021-0/+31
| | | | | | * Changelog for v1.15.7 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Check if column exist before rename if exist, just return with no error ↵Lunny Xiao2021-12-021-0/+24
| | | | | | | | | | | (#17870) (#17882) * Check if column exist before rename if exist, just return with no error * Also check if errors column exist * Add comment for migration * Fix sqlite test
* fix 500 error while use a reserved name in org rename (#17878) (#17881)a10121127962021-12-022-4/+1
| | | | | fix #17876 Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix user primary email changed (#17840)Lunny Xiao2021-11-286-14/+58
|
* Use correct user on releases (#17818)Gusted2021-11-261-2/+2
| | | | - Backport #17806
* Fixed commit count (#17698) (#17790)KN4CK3R2021-11-267-29/+32
| | | | | | | | | | * Fixed commit count (#17698) Added "Tag" label. Unified branch, tag and commit name. * Keep 1.15 behaviour. * Removed locale change.
* Preserve color when inverting emojis (#17799)silverwind2021-11-241-1/+1
| | | Fixes: https://github.com/go-gitea/gitea/issues/17795
* backport: use correct sender on title change (#17792)Gusted2021-11-241-1/+1
|
* Fix close issue but time watcher still running (#17761)Lunny Xiao2021-11-236-94/+151
| | | | | | | | | * Fix bug * Update models/issue_stopwatch.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Return 400 but not 500 when request archive with wrong format (#17691) (#17700)Lunny Xiao2021-11-204-9/+72
| | | | * Return 400 but not 500 when request archive with wrong format (#17691) * Remove bundle because it's not in this version
* Fix Migrate Description - backport (#17727)99rgosse2021-11-191-0/+1
|
* Fix bug when project board get open issue number (#17703) (#17726)Lunny Xiao2021-11-191-1/+3
| | | | | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix bug when read mysql database max lifetime (#17682) (#17690)Lunny Xiao2021-11-171-2/+2
|
* Backport #17649, fix database deadlock when update issue labels (#17665)wxiaoguang2021-11-171-12/+11
|
* Fix golangci-lint warnings (#17598 et al) (#17668)Gusted2021-11-1696-64/+139
| | | | | | | | | Backport #17598 Backport #17606 Backport #17608 Backport #17609 - Since https://gitea.com/gitea/test-env/pulls/10 the golangci-lint has been upgraded and is erroring about new warnings in the code, this PR fixes those warnings.
* Fix bug on detect issue/comment writer (#17592)Lunny Xiao2021-11-091-1/+1
|
* backport(1.15): Fix stats upon searching issues (#17578)Gusted2021-11-082-5/+47
| | | | | | - Backport of https://github.com/go-gitea/gitea/pull/17566 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Remove appSubUrl from pasted images (#17572) (#17588)zeripath2021-11-081-2/+2
| | | | | | | | | | | | Backport #17572 * Remove appSubUrl from pasted images Since we fixed the url base for the links in repositories we no longer need to add the appsuburl to pasted image links. Fix #17057 Signed-off-by: Andrew Thornton <art27@cantab.net>
* backport(1.15): make `ParsePatch` more robust (#17580)Gusted2021-11-082-1/+29
| | | - Backport of https://github.com/go-gitea/gitea/pull/17573
* Only allow webhook to send requests to allowed hosts (#17482) (#17510)wxiaoguang2021-11-069-26/+285
| | | | | | | | Backport #17482 * Only allow webhook to send requests to allowed hosts (backport #17482) * use ALLOWED_HOST_LIST=* for default to keep the legacy behavior in 1.15.x
* Escape issue titles in comments list (#17555) (#17556)zeripath2021-11-051-1/+1
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* backport(1.15): Use correct defaultValue for stracktrace (#17557)Gusted2021-11-051-1/+1
| | | - Backporting https://github.com/go-gitea/gitea/pull/17552
* Fix zero created time bug on commit api (#17547)Lunny Xiao2021-11-051-4/+6
| | | Co-authored-by: zeripath <art27@cantab.net>
* Show correct "No" icon (#17538)delvh2021-11-041-1/+1
|
* Fix database keyword quote problem on migration v161 (#17523)Lunny Xiao2021-11-031-1/+12
| | | * support rerun migration v161
* fix email with + when active (#17518) (#17520)Lunny Xiao2021-11-032-1/+3
| | | Co-authored-by: zeripath <art27@cantab.net>
* Stop double encoding blame commit messages (#17498) (#17500)zeripath2021-10-311-2/+1
| | | | | | | | | | | | | Backport #17498 The call to html.EscapeString in routers/web/repo/blame.go:renderBlame is extraneous as the commit message is now rendered by the template. The template will correctly escape strings - therefore we are currently double escaping. This PR fixes this. Fix #17492 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Quote the table name in CountOrphanedObjects (#17487) (#17488)zeripath2021-10-301-1/+1
| | | | | | | | | | Backport #17487 CountOrphanedObjects needs to quote the table it is joining with as this table may be `user`. Fix #17485 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Run Migrate in Install rather than just SyncTables (#17475) (#17486)zeripath2021-10-302-4/+24
| | | | | | | | | | | | | | | | | Backport #17475 The underlying problem in #17328 appears to be that users are re-running the install page during upgrades. The function that tests and creates the db did not intend for this and thus instead the migration scripts being run - a simple sync tables occurs. This then causes a weird partially migrated DB which causes, in this release cycle, the duplicate column in task table error. It is likely the cause of some weird partial migration errors in other cycles too. This PR simply ensures that the migration scripts are also run at this point too. Fix #17328 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix login redirection links (#17473)qwerty2872021-10-281-1/+1
|
* Changelog 1.15.6 (#17457)v1.15.6zeripath2021-10-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changelog 1.15.6 Unforunately #17435 is a somewhat critical bug and therefore we should really release 1.15.6 as soon as possible. ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-27 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (#17434) (#17435) * Fix CSV render error (#17406) (#17431) * Read expected buffer size (#17409) (#17430) Signed-off-by: Andrew Thornton <art27@cantab.net> * Add 17456 and its backport Signed-off-by: Andrew Thornton <art27@cantab.net> * Add 17464 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add final pr * Update date Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make commit-statuses popup show correctly (#17447) (#17466)wxiaoguang2021-10-282-3/+19
| | | | | Backport #17447 Close #17443
* Add integration tests for private.NoServCommand and private.ServCommand ↵zeripath2021-10-281-0/+154
| | | | | | | | | | | | | | (#17456) (#17463) Backport #17456 modules/private/serv.go has two major functions that are missing testcases to ensure that Deploy and normal SSH keys work correctly. This PR adds some basic integration tests for these. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Ensure that restricted users can access repos for which they are members ↵zeripath2021-10-284-4/+67
| | | | | | | | | | | | | | | | | | | (#17460) (#17464) Backport #17460 There is a small bug in the way that repo access is checked in repoAssignment: Accessibility is checked by checking if the user has a marked access to the repository instead of checking if the user has any team granted access. This PR changes this permissions check to use HasAccess() which does the correct test. There is also a fix in the release api ListReleases where it should return draft releases if the user is a member of a team with write access to the releases. The PR also adds a testcase. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent panic in serv.go with Deploy Keys (#17434) (#17435)zeripath2021-10-261-1/+1
| | | | | | | | | | Backport #17434 Unfortunately there was a regression in #17373 which missed that the user is not for deploy keys. This leads to a panic when pushing with deploy keys. Fix #17412 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix CSV render error (#17406) (#17431)KN4CK3R2021-10-252-22/+21
| | | | | | | | | | | | | | | Backport #17406. Closes #17378 Both errors from #17378 were caused by #15175. Problem 1 (error with added file): `ToUTF8WithFallbackReader` creates a `MultiReader` from a `byte[2048]` and the remaining reader. `CreateReaderAndGuessDelimiter` tries to read 10000 bytes from this reader but only gets 2048 because that's the first reader in the `MultiReader`. Then the `if size < 1e4` thinks the input is at EOF and just returns that. Problem 2 (error with changed file): The blob reader gets defer closed. That was fine because the old version reads the whole file into memory. Now with the streaming version the close needs to defer after the method. Co-authored-by: zeripath <art27@cantab.net>
* Read expected buffer size (#17409) (#17430)KN4CK3R2021-10-2511-29/+51
| | | | | | | Backport of #17409 * Read expected buffer size. * Changed name.
* Fix markdown checkbox rendering (#17427)wxiaoguang2021-10-251-0/+6
| | | | | We allow to render empty check list item - [ ], while GitHub doesn't allow. To make the rendering correct, we need tune the UI (the last PR #17413 uses absolute layout, which makes the empty checkbox item can not be displayed correctly)
* Fix issue markdown bugs (#17413)wxiaoguang2021-10-233-2/+9
| | | | | | | * Bug fix: render Markdown `http://AppURL/org/repo/issues/4?a=1&b=2#comment-123 test` to HTML correctly, close #17394 * Bug fix: fix the positions of checkboxes in rendered HTML, close #17395 # Conflicts: # modules/markup/html.go
* Changelog 1.15.5 (#17392)v1.15.5zeripath2021-10-211-0/+17
| | | | | | | | | | | | | | | | | | * SECURITY * Upgrade Bluemonday to v1.0.16 (#17372) (#17374) * Ensure correct SSH permissions check for private and restricted users (#17370) (#17373) * BUGFIXES * Prevent NPE in CSV diff rendering when column removed (#17018) (#17377) * Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH (#17281) (#17376) * Don't panic if we fail to parse U2FRegistration data (#17304) (#17371) * Ensure popup text is aligned left (backport for 1.15) (#17343) * Ensure that git daemon export ok is created for mirrors (#17243) (#17306) * Disable core.protectNTFS (#17300) (#17302) * Use pointer for wrappedConn methods (#17295) (#17296) * AutoRegistration is supposed to be working with disabled registration (backport) (#17292) * Handle duplicate keys on GPG key ring (#17242) (#17284) * Fix SVG side by side comparison link (#17375) (#17391) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix SVG side by side comparison link (#17375) (#17391)zeripath2021-10-212-7/+6
| | | | | | | | | | | | Backport #17375 Define unique names for image tabs in pull requests, in order to toggle tabs correctly when multiple are displayed on one page. Fixes position of swipe-bar so it does not overlay other UI components when scrolling. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> Co-authored-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH (#17281) (#17376)zeripath2021-10-211-0/+56
| | | | | | | | | | | | | | | | Backport #17281 There is a subtle bug in the SSH library x/crypto/ssh which makes the incorrect assumption that the public key type is the same as the signature algorithm type. This means that only ssh-rsa signatures are offered by default. This PR adds a workaround around this problem. Fix #17175 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix heatmap test (#17381) (#17383)Lunny Xiao2021-10-211-0/+6
| | | Backport #17381
* Upgrade Bluemonday to v1.0.16 (#17372) (#17374)65432021-10-2018-45/+159
|
* Prevent NPE in CSV diff rendering when column removed (#17018) (#17377)Richard Mahn2021-10-207-136/+351
| | | | | Backport of #17018 Fixes #16837 if a column is deleted.
* Ensure correct SSH permissions check for private and restricted users ↵65432021-10-201-1/+6
| | | | | | | | | | | | (#17370) (#17373) Repositories owned by private users and organisations and pulls by restricted users need to have permissions checked. Previously Serv would simply assumed that if the user could log in and the repository was not private then it would be visible. Fix #17364 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Don't panic if we fail to parse U2FRegistration data (#17304) (#17371)zeripath2021-10-203-2/+28
| | | | | | | | | | | Backport #17304 Downgrade logging statement from Fatal to Error so that errors parsing U2FRegistration data does not panic; instead, the invalid key will be skipped and we will attempt to parse the next one, if available. Signed-off-by: David Jimenez <dvejmz@sgfault.com> Co-authored-by: David Jimenez <dvejmz@users.noreply.github.com>
* Allow mocking timeutil (#17354) (#17356)John Olheiser2021-10-182-0/+23
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Ensure popup text is aligned left (#17343)Mario Lubenka2021-10-171-0/+4
| | | Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Ensure that git daemon export ok is created for mirrors (#17243) (#17306)zeripath2021-10-146-28/+79
| | | | | | | | | | | | Backport #17243 There is an issue with #16508 where it appears that create repo requires that the repo does not exist. This causes #17241 where an error is reported because of this. This PR fixes this and also runs update-server-info for mirrors and generated repos. Fix #17241 Signed-off-by: Andrew Thornton <art27@cantab.net>