summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Hide label comments if labels were added and removed immediately (#17455)qwerty2872021-11-042-12/+87
| | | | | | | | | | | * Hide label comments if labels were added and removed immediately * Add comment and rename var * Fix unit test * Add test case Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Show correct "No" icon (#17537)delvh2021-11-041-1/+1
|
* Use exec -a in the FHS compliant script (#17513)zeripath2021-11-031-1/+1
|
* Fix list for options under cli->user->admin->create (#17382)SahAssar2021-11-031-4/+16
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* hide note message for pull request template (#17529)a10121127962021-11-021-1/+3
| | | Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Simplify Gothic to use our session store instead of creating a different ↵zeripath2021-11-0325-934/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | store (#17507) * Simplify Gothic to use our session store instead of creating a different store We have been using xormstore to provide a separate session store for our OAuth2 logins however, this relies on using gorilla context and some doubling of our session storing. We can however, simplify and simply use our own chi-based session store. Thus removing a cookie and some of the weirdness with missing contexts. Signed-off-by: Andrew Thornton <art27@cantab.net> * as per review Signed-off-by: Andrew Thornton <art27@cantab.net> * as per review Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle MaxTokenLength Signed-off-by: Andrew Thornton <art27@cantab.net> * oops Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add QueryEscape to general funcmap (#17526)zeripath2021-11-021-0/+1
| | | | | | QueryEscape was only added to the text funcmap. Add this to the main template funcmap too. Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix email with + when active (#17518)Lunny Xiao2021-11-022-1/+2
| | | Co-authored-by: zeripath <art27@cantab.net>
* Make Repo Code Indexer an Unique Queue (#17515)zeripath2021-11-023-25/+12
| | | | | | | The functioning of the code indexer queue really only makes sense as an unique queue and doing this allows use to simplify the indexer data to simply delete the data if the repo is no longer in the db. Signed-off-by: Andrew Thornton <art27@cantab.net>
* docs: add SSH passthrough instructions to with-docker-rootless (#17505) (#17508)Renato Caldas2021-11-011-3/+38
| | | The passthrough is based upon AuthorizedKeysCommand and a custom shell wrapper that forwards commands to the container over the docker pipe.
* Only allow webhook to send requests to allowed hosts (#17482)wxiaoguang2021-11-019-23/+284
|
* Stop double encoding blame commit messages (#17498)zeripath2021-10-311-2/+1
| | | | | | | | | | | 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>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-10-313-4/+26
|
* Properly determine CSV delimiter (#17459)Richard Mahn2021-10-305-94/+642
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixes #16558 CSV delimiter determiner * Fixes #16558 - properly determine CSV delmiiter * Moves quoteString to a new function * Adds big test with lots of commas for tab delimited csv * Adds comments * Shortens the text of the test * Removes single quotes from regexp as only double quotes need to be searched * Fixes spelling * Fixes check of length as it probalby will only be 1e4, not greater * Makes sample size a const, properly removes truncated line * Makes sample size a const, properly removes truncated line * Fixes comment * Fixes comment * tests for FormatError() function * Adds logic to find the limiter before or after a quoted value * Simplifies regex * Error tests * Error tests * Update modules/csv/csv.go Co-authored-by: delvh <dev.lh@web.de> * Update modules/csv/csv.go Co-authored-by: delvh <dev.lh@web.de> * Adds comments * Update modules/csv/csv.go Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de>
* Rename db Engines related functions (#17481)Lunny Xiao2021-10-3014-31/+31
| | | | | * Rename db Engines related functions Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Quote the table name in CountOrphanedObjects (#17487)zeripath2021-10-301-1/+1
| | | | | | | | | 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-307-12/+7
|
* Run Migrate in Install rather than just SyncTables (#17475)zeripath2021-10-292-4/+24
| | | | | | | | | | | | | | | | | | * Run Migrate in Install rather than just SyncTables 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-295-6/+57
|
* Update docs/config.yaml to 1.15.6 (#17472)zeripath2021-10-281-1/+1
| | | | | Update the version in docs/config.yaml to 1.15.6 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move key forms before list and add cancel button (#17432)qwerty2872021-10-284-89/+80
| | | | | | | * Move GPG form before list and add cancel button * Move SSH form before list and add cancel button Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix login redirection links (#17451)qwerty2872021-10-281-1/+1
| | | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Changelog 1.15.6 (#17457) (#17468)zeripath2021-10-281-0/+11
| | | | | | | | | | | | | | Frontport #17457 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (#17434) (#17435) * Fix CSV render error (#17406) (#17431) * Read expected buffer size (#17409) (#17430) * Ensure that restricted users can access repos for which they are members (#17460) (#17464) * Make commit-statuses popup show correctly (#17447) (#17466) * TESTING * Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
* Fix mispelling of starred as stared (#17465)zeripath2021-10-282-2/+2
| | | | | | | | | | There was a recent spelling mistake added to the locale file where stared was used instead of starred. This PR changes this to starred. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Ensure that restricted users can access repos for which they are members ↵zeripath2021-10-284-4/+67
| | | | | | | | | | | | | | | | | (#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>
* make commit-statuses popup can be shown correctly. (#17447)wxiaoguang2021-10-282-3/+19
| | | | | | | | | | Close #17443 Maybe we do not need to backport this PR, the bug doesn't break daily usage. After the fix, the commit statuses popup can show a lot of lines with scroll bars: ![image](https://user-images.githubusercontent.com/2114189/139026160-f01b484c-6207-494a-a190-a6dd184ceb2b.png)
* Add integration tests for private.NoServCommand and private.ServCommand (#17456)zeripath2021-10-281-0/+154
| | | | | | | | 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>
* Add appearance section in settings (#17433)qwerty2872021-10-279-89/+161
| | | | | | | | | | | | | * Add appearance section in settings * Fix lint * Fix lint * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix a UI error when folding a file content in a commit view (#17446)wxiaoguang2021-10-272-3/+2
|
* Show client-side error if wiki page is empty (#17415)David Jimenez2021-10-272-3/+21
| | | | | | | | | | | | | | | * fix: show client-side error if wiki page is empty Implement a JS, client-side validation workaround for a bug in the upstream editor library SimpleMDE which breaks HTML5 client-side validation when a wiki page is submitted. This allows native, client-side errors to appear if the text editor contents are empty. See upstream bugfix report: https://github.com/sparksuite/simplemde-markdown-editor/issues/324 Signed-off-by: David Jimenez <dvejmz@sgfault.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fixes #16559 - Do not trim leading spaces for tab delimited (#17442)Richard Mahn2021-10-262-8/+53
| | | | | | | | | | | * Fixes #16559 - Do not trim leading spaces for tab delimited * Adds back semicolon delimited test * Fixes linting * Adds nolint directive to test because uses strings starting with spaces Co-authored-by: zeripath <art27@cantab.net>
* Fix docker rootless build (#17441)wxiaoguang2021-10-261-1/+1
|
* Tune UI alignment for nav bar notification icon, avatar image, issue label ↵wxiaoguang2021-10-262-0/+3
| | | | (#17438)
* Upgrade go-github to v39 (#17437)Lunny Xiao2021-10-26126-169/+2563
|
* Prevent panic in serv.go with Deploy Keys (#17434)zeripath2021-10-261-1/+1
| | | | | | | | 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>
* chmod executables when copying to the docker (#17423)zeripath2021-10-252-1/+4
| | | | | | | | | Run chmod on the executables and the entrypoint when copying them to the docker in dockerfile. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
* Upgrade webpack to 5.59.1 to resolve the `waitFor` bug with `watch-frontend` ↵wxiaoguang2021-10-252-8/+8
| | | | | (#17428) Webpack < 5.59 has a bug, which makes watch-frontend fail when editing .less files.
* fix markdown checkbox rendering (#17425)wxiaoguang2021-10-251-0/+6
|
* In many cases user avatar link should be an absolute URL with http host (#17420)wxiaoguang2021-10-253-3/+9
|
* Add API to get/edit wiki (#17278)qwerty2872021-10-258-1/+1336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get/edit wiki * Add swagger docs, various improvements * fmt * Fix lint and rm comment * Add page parameter * Add pagination to pages * Add tests * fmt * Update func names * Update error handling * Update type name * Fix lint * Don't delete Home * Update func name * Update routers/api/v1/repo/wiki.go Co-authored-by: delvh <dev.lh@web.de> * Remove unnecessary check * Fix lint * Use English strings * Update integrations/api_wiki_test.go Co-authored-by: delvh <dev.lh@web.de> * Update func and test names * Remove unsed check and avoid duplicated error reports * Improve error handling * Return after error * Document 404 error * Update swagger * Fix lint * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Document file encoding * fmt * Apply suggestions * Use convert * Fix integration test * simplify permissions * unify duplicate key Title/Name * improve types & return UTC timestamps * improve types pt.2 - add WikiPageMetaData.LastCommit - add WikiPageMetaData.HTMLURL - replace WikiPageMetaData.Updated with .LastCommit.Committer.Created also delete convert.ToWikiPage(), as it received too many arguments and only had one callsite anyway. sorry for bad advice earlier 🙃 * WikiPage.Content is base64 encoded * simplify error handling in wikiContentsByName() * update swagger * fix & DRY findWikiRepoCommit() error handling ListWikiPages() previously wrote error twice when repo wiki didn't exist * rename Content -> ContentBase64 * Fix test * Fix tests * Update var name * suburl -> sub_url Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Norwin <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-251-0/+6
|
* Fix CSV render error (#17406)KN4CK3R2021-10-252-22/+21
| | | | | | | | | | | closed #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.
* Read expected buffer size (#17409)KN4CK3R2021-10-2411-29/+51
| | | | | | * Read expected buffer size. * Changed name.
* Add HAProxy Config to reverse-proxies.en-us.md (#17407)Kane2021-10-241-0/+47
| | | | | | | * Update reverse-proxies.en-us.md Addition of HAProxy * Update reverse-proxies.en-us.md
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-241-1/+7
|
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-230-0/+0
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-234-8/+11
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue markdown bugs (#17411)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
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-238-6/+14
|
* Remove deprecated `extendDefaultPlugins` method of svgo (#17399)Mashiro2021-10-221-3/+4
|