summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use filename as id/class prefix. (#16997) (#17000)KN4CK3R2021-09-092-1/+2
| | | | | | | | | | | | | Currently the svg minifier (`make svg`) rewrites all `id` and `class` attributes in svg files. Every file gets the ids `a, b, ...`. If multiple svgs with ids are used on a page these ids are conflicting and the results are broken images. | minified ids | unique ids | | - | - | | ![grafik](https://user-images.githubusercontent.com/1666336/132579375-59d3996f-c4e5-43b8-8c8d-82280c90d9e3.png) | ![grafik](https://user-images.githubusercontent.com/1666336/132579413-05bf9285-4e3b-4d0d-8f95-90b212405b05.png) | This PR adds a prefix (the filename) to every id/class. Follow up problem: Because we embed svg images there are duplicated ids if one svg image is used multiple times on a page. As those ids refer to the same content it may be no real problem because browser handle that fine.
* Fix bug of migrated repository not index (#16991) (#16996)65432021-09-091-3/+2
| | | | | Fix #16986, #16152 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Skip AllowedUserVisibilityModes validation on update user if it is an ↵65432021-09-081-2/+2
| | | | | | | | | organisation (#16988) (#16990) if AllowedUserVisibilityModes allow only public & limited, and orgs can be private, a user can create a repo to that organisation whitch will result in an update of the user. On this call the user is validaten and will be rejected since private is not allowed, but its not an user its an valid org ... Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com> Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
* Fix storage Iterate bug and Add storage doctor to delete garbage attachments ↵Lunny Xiao2021-09-074-3/+83
| | | | | | | | | (#16971) (#16977) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments * Close object when used
* Fix issue with issue default mail template (#16956) (#16975)Prasad Katti2021-09-071-1/+1
| | | | | | | | | | | | Backport #16956 The mail template rendering was failing with the error - `...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment` The issue was the template variable i18n is available in the outer scope. Fix #16877 Co-authored-by: 6543 <6543@obermui.de>
* Add fluid to ui container class to remove margin (#16396) (#16976)silverwind2021-09-072-2/+2
| | | Co-authored-by: Stanley Hu <stanthetiger@yahoo.com>
* Ensure that rebase conflicts are handled in updates (#16952) (#16960)zeripath2021-09-052-0/+18
| | | | | | | | | | Backport #16952 PR #16125 did not update the error handlers to handle conflict errors relating to rebases. This PR adds them. Fix #16922 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent panic on diff generation (#16950) (#16951)zeripath2021-09-051-0/+4
| | | | | | | | | | Backport #16950 The lastLeftIdx should be reset at the same time as creating a new section otherwise it is possible for a second addition to end up attempting to read a nil entry. Fix #16943 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog 1.15.2 (#16940)v1.15.2zeripath2021-09-031-0/+6
| | | | | | | | | | ## [1.15.2](https://github.com/go-gitea/gitea/releases/tag/v1.15.2) - 2021-09-03 * BUGFIXES * Add unique constraint back into issue_index (#16938) * Close storage objects before cleaning (#16934) (#16942) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Close storage objects before cleaning (#16934) (#16942)zeripath2021-09-031-0/+1
| | | | | | | | | | | | | Backport #16934 Storage.Iterate provides the path and an open object. On windows using local storage means that the objects will be locked thus preventing clean from deleting them. This PR simply closes the objects early. Fix #16932 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add unique constraint back into issue_index (#16938)zeripath2021-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | There is a flaw in #16820 where it was missed that although xorm will not add a primary key to a table during syncing, it will remove an unique constraint. Users upgrading from 1.15.0 to 1.15.1 will therefore lose the unique constraint that makes this table work unless they run `gitea doctor recreate-table issue_index`. Postgres helpfully warns about this situation but MySQL does not. Main/1.16-dev is not affected by this issue as there is a migration that does the above recreation by default. Users moving directly to 1.15.1 from 1.14.x or lower are also not affected. Whilst we could force all users who ran 1.15.0 to do the above recreate-table call, this PR proposes an alternative: Just add the unique constraint back in for 1.15.x. This won't have any long term effects - just some wasted space for the unnecessary index. Fix #16936 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog 1.15.1 (#16925)v1.15.1zeripath2021-09-021-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02 * BUGFIXES * Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923) * Prevent leave changes dialogs due to autofill fields (#16912) (#16920) * Ignore review comment when ref commit is missed (#16905) (#16919) * Fix wrong attachment removal (#16915) (#16917) * Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913) * Correctly return the number of Repositories for Organizations (#16807) (#16911) * Test if LFS object is accessible (#16865) (#16904) * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900) * Fix dump and restore respository (#16698) (#16898) * Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895) * Fix wiki raw commit diff/patch view (#16891) (#16892) * Ensure wiki repos are all closed (#16886) (#16888) * List limited and private orgs if authenticated on API (#16866) (#16879) * Simplify split diff view generation and remove JS dependency (#16775) (#16863) * Ensure that the default visibility is set on the user create page (#16845) (#16862) * In Render tolerate not being passed a context (#16842) (#16858) * Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848) * Report the correct number of pushes on the feeds (#16811) (#16822) * Add primary_key to issue_index (#16813) (#16820) * Prevent NPE on empty commit (#16812) (#16819) * Fix branch pagination error (#16805) (#16816) * Add missing return to handleSettingRemoteAddrError (#16794) (#16795) * Remove spurious / from issues.opened_by (#16793) * Ensure that template compilation panics are sent to the logs (#16788) (#16792) * Update caddyserver/certmagic (#16789) (#16790) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow BASIC authentication access to /:owner/:repo/releases/download/* ↵zeripath2021-09-024-10/+14
| | | | | | | | | | | (#16916) (#16923) Backport #16916 Duplicate #15987 to allow access to releases download through BASIC authentication. Fix #16914 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent leave changes dialogs due to autofill fields (#16912) (#16920)zeripath2021-09-022-2/+2
| | | | | | | | | | Backport #16912 Add ignore-dirty to /user/settings/account Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings Fix #16861 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ignore review comment when ref commit is missed (#16905) (#16919)Lunny Xiao2021-09-021-1/+2
| | | backport #16905
* Fix wrong attachment removal (#16915) (#16917)wxiaoguang2021-09-021-20/+11
| | | Backport #16917
* Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)zeripath2021-09-011-6/+12
| | | | | | | Backport #16903 Fix bug related to early breaking when migrating reactions. Co-authored-by: 6543 <6543@obermui.de>
* Correctly return the number of Repositories for Organizations (#16807) (#16911)zeripath2021-09-012-13/+57
| | | | | | | | | | | | | | Backport #16807 Calculate and return the number of Repositories on the dashboard Organization list. This PR restores some of the logic that was removed in #14032 to calculate the number of repos on the dashboard orgs list. Fix #16648 Replaces #16799 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Test if LFS object is accessible (#16865) (#16904)65432021-08-312-19/+60
| | | | | | | * Test if object is accessible. * Added more logging. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* List limited and private orgs if authenticated on API (#16866) (#16879)65432021-08-313-4/+4
|
* Fix dump and restore respository (#16698) (#16898)Lunny Xiao2021-08-316-4/+17
| | | | | | | | | | * Fix dump and restore * return different error message for get commit * Fix missing delete release attachment when deleting repository * Fix ci and add some comments back port #16698 Co-authored-by: zeripath <art27@cantab.net>
* Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) ↵65432021-08-314-9/+7
| | | | | | | | | (#16900) * make sure headGitRepo is closed on err too * refactor * Fix git.Blob.DataAsync(): exec cancel since we already read all bytes (close pipe since we return a NopCloser) Co-authored-by: zeripath <art27@cantab.net>
* Fix wiki raw commit diff/patch view (#16891) (#16892)65432021-08-311-1/+1
|
* Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)65432021-08-315-37/+26
| | | fix pipe leak
* Ensure wiki repos are all closed (#16886) (#16888)65432021-08-301-32/+34
| | | | | | | | There are multiple places where wiki git repositories are not properly closed. This PR ensures they are closed. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Simplify split diff view generation and remove JS dependency (#16775) (#16863)zeripath2021-08-304-75/+109
| | | | | | | | | | | | | Backport #16775 Gitea has relied on some slow JS code to match up added and deleted lines on the diff pages. This can cause a considerable slow down on large diff pages. This PR makes a small change meaning that the matching up can occur much more simply. Partial fix #1351 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure that the default visibility is set on the user create page (#16845) ↵zeripath2021-08-291-1/+1
| | | | | | | | | | | (#16862) Backport #16845 Set the default visibility on the user create page. Fix #16840 Signed-off-by: Andrew Thornton <art27@cantab.net>
* In Render tolerate not being passed a context (#16842) (#16858)65432021-08-297-1/+20
| | | | | | | | | | | | | | | | | | | * In Render tolerate not being passed a context It is possible for RenderString to be passed to an external renderer if markdown is set to be rendered by an external renderer. No context is currently sent to these meaning that this will error out. Fix #16835 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Context to Repo calls for RenderString All calls from routers can easily add the context - so add it. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login ↵zeripath2021-08-28135-5404/+42891
| | | | | | | | | | | | | | | | | | sources remains correct (#16847) (#16848) * Upgrade xorm to v1.2.2 (#16663) Backport #16663 Fix #16683 * Add test to ensure that dumping of login sources remains correct (#16847) #16831 has occurred because of a missed regression. This PR adds a simple test to try to prevent this occuring again. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Report the correct number of pushes on the feeds (#16811) (#16822)techknowlogick2021-08-263-2/+15
| | | | | | | | | | | | | | | | | | * Report the correct number of pushes on the feeds Since the number of commits in the Action table has been limited to 5 the number of commits reported on the feeds page is now incorrectly also limited to 5. The correct number is available as the Len and this PR changes this to report this. Fix #16804 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update templates/user/dashboard/feeds.tmpl Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Add primary_key to issue_index (#16813) (#16820)zeripath2021-08-253-5/+5
| | | | | | | | | | | | | | | | | | | | Backport #16813 Make the group_id a primary key in issue_index. This already has an unique index and therefore is a good candidate for becoming a primary key. This PR also changes all other uses of this table to add the group_id as the primary key. The migration v192 from #16813 has not been backported but Xorm will work fine with non-primary keyed tables. If a user on 1.15 wishes to have the correct schema sooner than 1.16 - they can use gitea doctor recreate-table issue_index and gitea will recreate the table with the primary key. Fix #16802 Signed-off-by: Andrew Thornton art27@cantab.net
* Prevent NPE on empty commit (#16812) (#16819)zeripath2021-08-251-0/+3
| | | | | | | | | Backport #16812 Handle completely empty commit as the first commit to a repository. Fix #16668 Signed-off-by: Andrew Thornton art27@cantab.net
* Fix branch pagination error (#16805) (#16816)Lunny Xiao2021-08-251-1/+1
| | | | | | | Backport #16805 Fix #16801 Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
* Ensure that template compilation panics are sent to the logs (#16788) (#16792)zeripath2021-08-231-0/+5
| | | | | | | | | | | | | | Backport #16788 Although panics within the rendering pipeline are caught and dealt with, panics that occur before that starts are unprotected and will kill Gitea without being sent to the logs. This PR adds a basic recovery handler to catch panics that occur after the logger is initialised and ensure that they're sent to the logger. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove spurious / from issues.opened_by (#16793)zeripath2021-08-232-2/+2
| | | | | | | Fix #16713 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add missing return to handleSettingRemoteAddrError (#16794) (#16795)zeripath2021-08-231-0/+1
| | | | | | | | | | | | Backport #16794 There is a missing return in handleSettingRemoteAddrError which means that the error page for repo settings is duplicately rendered. Fix #16771 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update only certmagic (#16790)zeripath2021-08-234-14/+20
| | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: jolheiser <john.olheiser@gmail.com>
* changelog for 1.15.0 (#16760)v1.15.0techknowlogick2021-08-211-47/+45
| | | | | | | | | | | | | | * changelog for 1.15.0 * Slight rename of GPG feature Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Keep attachments on tasklist update (#16750) (#16757)KN4CK3R2021-08-212-16/+21
| | | | | | | | | | | | | * Send attachments too. * Use tasklist flag. * use action="ignoreAttachments" instead of "tasklist" * Use boolean parameter. * when the update request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates (#16762) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16739)zeripath2021-08-201-0/+15
| | | | | | | | The MySQL indexes are not being renamed at the same time as RENAME table despite the CASCADE. Therefore it is probably better to just recreate the indexes instead. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix dependency translations (#16755)Steven2021-08-2020-40/+40
| | | Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
* Do not use thin scrollbars on Firefox (#16738) (#16745)Elouan Martinet2021-08-201-1/+0
| | | | | | | | | | | In #7269, thin scrollbars were added in Arc Green theme. It got moved in base theme in #13361. This PR removes the use of thin scrollbars which causes an accessibility issue. The scrollbars become too thin to be dragged. Signed-off-by: Elouan Martinet <exa@elou.world> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix wrong user in OpenID response (#16736) (#16741)KN4CK3R2021-08-203-10/+101
| | | | | | | | | | | * Fix wrong user in OpenID response (#16736) * Fixed usage of wrong user. * Added tests. * Fixed wrong import. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Restore functionality for pushing non-standard refs (Partial #16705) (#16706)zeripath2021-08-171-5/+0
| | | | | | | | | | | | Partial Backport #16705 There was an inadvertent breaking change in #15629 meaning that notes refs and other git extension refs will be automatically rejected. This PR removes this incorrect forced rejection of non-standard refs. Fix #16688 Signed-off-by: Andrew Thornton <art27@cantab.net>
* release/v1.15: set min go version to min upstream supported go1.16 (#16710)techknowlogick2021-08-173-4/+4
| | | | | * release/v1.15: set min go version to min upstream supported 1.16 * update drone
* Upgrade levelqueue 0.4.1 (#16696) (#16700)Lunny Xiao2021-08-164-8/+8
|
* Ensure empty lines are copiable and final new line too (#16678) (#16692)zeripath2021-08-152-0/+116
| | | | | | | | | | Backport #16678 When files are highlighted the newline character needs to be added in a whitespace compliant mode. Also ensure the final empty newline is rendered. Fix #16434 Signed-off-by: Andrew Thornton <art27@cantab.net>
* If PatchURL is empty, skip pull patch download when migrating (Partial ↵65432021-08-131-0/+3
| | | | | | | #16356) (#16681) Partial backport #16356 Whilst looking at adding migration support for onedev it has become apparent that gitea would attempt to pull patches on other migration targets even if that PatchURL was empty.
* Update issue_index to finish migration (#16685) (#16687)65432021-08-132-0/+30
| | | | | * update issue_index to finish migration * One Func to RecalculateIssueIndexForRepo
* Fix NPE in fuzzer (#16680) (#16682)65432021-08-133-1/+20
| | | | | | | | | The fuzzer found an issue with the issue pattern processor where there is a spurious path.Clean which does not need to be there. This PR also sets the default AppURL for the fuzzer too. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>