aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove double escape on labels addition in comments (#12809) (#12810)techknowlogick2020-09-111-1/+1
| | | | | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix "only mail on mention" bug (#12775) (#12789)赵智超2020-09-103-2/+29
| | | | | | | | | | | | | * fix mail mention bug fix #12774 Signed-off-by: a1012112796 <1012112796@qq.com> * fix test Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix yet another bug with diff file names (#12771) (#12776)zeripath2020-09-093-48/+246
| | | | | | | | | | | Backport #12771 Following further testing it has become apparent that the diff line cannot be used to determine filenames for diffs with any sort of predictability the answer therefore is to use the other lines that are provided with a diff Fix #12768 Signed-off-by: Andrew Thornton <art27@cantab.net>
* gitea dump: include version & Check InstallLock (#12760) (#12762)65432020-09-073-0/+21
| | | | | * gitea dump: include version * Check InstallLock
* RepoInit Respect AlternateDefaultBranch (#12746) (#12751)65432020-09-061-0/+4
|
* Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) (#12745) (#12750)65432020-09-068-124/+292
| | | | | * Update Vendor github.com/nfnt/resize * switch resize algo NearestNeighbor -> Bilinear
* [Backport] Fix go1.15 lint error in modules/public/public.go (#12707) (#12708)65432020-09-041-1/+2
| | | | | * fix go1.15 lint error in modules/public/public.go * CI.restart()
* Changelog for 1.12.4 release (#12687)v1.12.4techknowlogick2020-09-031-0/+27
| | | Co-authored-by: zeripath <art27@cantab.net>
* [Backport] Fix comment broken issue ref dependence (#12651) (#12692)65432020-09-032-2/+9
| | | | | | | * deleteIssuesByRepoID: delete related CommentTypeRemoveDependency & CommentTypeAddDependency comments too * Ignore ErrIssueNotExist on comment.LoadDepIssueDetails() * CI.restart()
* Make default StaticRootPath compile time settable (#12371) (#12652)65432020-09-022-2/+6
| | | | | | | | Make it possible to compile the default location of StaticRootPath independent from AppWorkPath Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* When reading expired sessions - expire them (#12686) (#12690)techknowlogick2020-09-029-231/+32
| | | | | | | | | | | | | | | | | * When reading expired sessions - expire them Update to latest macaron/session following merge of https://gitea.com/macaron/session/pulls/11 Also remove old memory provider as 11 updates the memory provider to make it unnecessary. Signed-off-by: Andrew Thornton <art27@cantab.net> * and macaron/session/pulls/12 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Escape provider name in oauth2 provider redirect (#12650)65432020-08-301-1/+2
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Mark Cache with ini tag (#12605) (#12611)John Olheiser2020-08-261-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Escape Email in forgot_password.tmpl (#12610) (#12612)John Olheiser2020-08-261-1/+1
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* go1.15 on windows (#12589) (#12593)techknowlogick2020-08-241-2/+3
| | | We don't support go1.15 on 1.12.x branch, however this will allow users who chose to build with go1.15 on windows to be successful
* Fix diff path unquoting (#12554) (#12575)zeripath2020-08-232-30/+34
| | | | | | | | | | | | | | | | | | | Backport #12554 * Fix diff path unquoting services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix #12546 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add testcase as per @mrsdizzie Signed-off-by: Andrew Thornton <art27@cantab.net>
* Skip SSPI authentication attempts for /api/internal (#12556) (#12559)zeripath2020-08-223-1/+8
| | | | | | | | | | | | Backport #12556 SSPI fails badly on authentication attempts to /api/internal which it can never succesfully authenticate. Fix #11260 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Default empty merger list to those with write permissions (#12535) (#12560)zeripath2020-08-223-4/+9
| | | | | | | | | Backport #12535 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* models: break out of loop (#12386) (#12561)zeripath2020-08-221-1/+2
| | | | | Backport #12386 Co-authored-by: Lars Lehtonen <lars.lehtonen@gmail.com>
* Improve HTML escaping helper (#12562)silverwind2020-08-223-10/+13
| | | | | | The previous method did not escape single quotes which under some circumstances can lead to XSS vulnerabilites and the fact that it depends on jQuery is also not ideal. Replace it with a lightweight module.
* Prevent NPE on commenting on lines with invalidated comments (#12549) (#12550)zeripath2020-08-214-3/+125
| | | | | | | | | | | | | | | | * Prevent NPE on commenting on lines with invalidated comments Only check for a review if we are replying to a previous review. Prevent the NPE in #12239 by assuming that a comment without a Review is non-pending. Fix #12239 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add hack around to show the broken comments Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove hardcoded ES indexername (#12521) (#12526)John Olheiser2020-08-181-1/+1
| | | Co-authored-by: Wim <wim@42.be>
* Keys should not verify revoked email addresses (#12486) (#12495)zeripath2020-08-171-0/+3
| | | | | | | | | Backport #12486 Fix #6778 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix bug preventing transfer to private organization (#12497) (#12501)techknowlogick2020-08-175-8/+17
| | | | | | | | | | | | | | | | | | | * Fix bug preventing transfer to private organization The code assessing whether a private organization was visible to a user before allowing transfer was incorrect due to testing membership the wrong way round This PR fixes this issue and renames the function performing the test to be clearer. Further looking at the API for transfer repository - no testing was performed to ensure that the acting user could actually see the new owning organization. Signed-off-by: Andrew Thornton <art27@cantab.net> * change IsUserPartOfOrg everywhere Co-authored-by: zeripath <art27@cantab.net>
* Do not add prefix on http/https submodule links (#12477) (#12479)techknowlogick2020-08-132-3/+4
| | | | | | | Fix #12345 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Fix ignored login on compare (#12476) (#12478)techknowlogick2020-08-121-1/+1
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Match GH with Commit page (#12425) (#12431)techknowlogick2020-08-051-5/+5
| | | | | Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Fix incorrect error logging in Stats indexer and OAuth2 (#12387) (#12422)techknowlogick2020-08-042-3/+9
| | | | | | | | | | | | | | | | | | | | | | | * Fix incorrect logging in oauth2.go Fix #11945 Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle ErrAlreadyInQueue in stats indexer Fix #12380 Signed-off-by: Andrew Thornton <art27@cantab.net> * Fixes type in error message of indexer Add the missing character in the error message. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lieven Hollevoet <hollie@lika.be> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lieven Hollevoet <hollie@lika.be>
* [Vendor] upgrade google/go-github to v32.1.0 (#12361) (#12390)65432020-07-31114-2623/+9157
| | | | | * upgrate go-github client to v32.1.0 * migrate
* Rendoer emoji's of Commit message on feed-page (#12373)65432020-07-291-1/+1
|
* Git 2.28 no longer permits diff with ... on unrelated branches (#12370)zeripath2020-07-294-11/+54
| | | | | Backport #12364 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog v1.12.3 (#12356)v1.12.365432020-07-281-0/+11
| | | | | | | * Changelog v1.12.3 * better description for 12351 * @techknowlogick suggestions
* Backport to v1.12 for #12341 - Release date fix (#12351)Richard Mahn2020-07-282-1/+152
| | | | | | | | | * Backport for Issue #12341 PR #12343 - Release date fix * Adds sleep for comparing times * Fixes imports * Fixes tests
* Show 404 page when release not found (#12328) (#12332)techknowlogick2020-07-271-0/+4
| | | | | | | | Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Backport emoji fixes to 1.12 (#12327)silverwind2020-07-254-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix emoji detection in certain cases (#12320) * Fix emoji detection certain cases Previous tests weren't complicated enough so there were some situations where emojis were't detected properly. Find the earliest occurance in addition to checking for the longest combination. Fixes #12312 * ok spell bot Co-authored-by: Lauris BH <lauris@nix.lv> * Reduce emoji size (#12317) * Reduce emoji size Rendering should now pretty much match GitHub with 1.25em. I verified that emojis don't increase the line height and removed unecessary size overrides because now all emojis should appear similar in relation to the font size. * fix reaction hover Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix double-indirection bug in logging IDs (#12294) (#12308)techknowlogick2020-07-241-1/+1
| | | | | | | | This PR fixes a bug in log.NewColoredIDValue() which led to a double indirection and incorrect IDs being printed out. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* [ui] Link to pr list page on sidebar when view pr (#12256) (#12263)techknowlogick2020-07-161-3/+3
| | | | | | | Fix #12254 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: 赵智超 <1012112796@qq.com>
* Extend Notifications API and return pinned notifications by default (#12164) ↵zeripath2020-07-137-24/+206
| | | | | | | | | | | | | (#12232) Backport #12164 This PR extends the notifications API to allow specific notification statuses to be searched for and to allow setting of notifications to statuses other than read. By default unread and pinned statuses will be returned when querying for notifications - however pinned statuses will not be marked as read. Close #12152 Signed-off-by: Andrew Thornton art27@cantab.net
* Changelog for v1.12.2 (#12214)v1.12.2Lauris BH2020-07-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changelog for v1.12.2 * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update CHANGELOG.md Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Decrease the num_stars when deleting a repo (#11954) (#12188)赵智超2020-07-083-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Decrease the num_stars when deleting a repo fix #11949 Signed-off-by: a1012112796 <1012112796@qq.com> * Add migration * use batch * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint * fix lint * fix ci * fix ci2 * add doctor * duplicate code * fix migration * fix some nits * add start Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix regression: Gitea commits API again returns commit summaries, not full ↵techknowlogick2020-07-081-1/+1
| | | | | | | messages (#12186) (#12187) Closes #12185 Co-authored-by: Kristian Antonsen <kristian@derfor.dk>
* properly set symbolic-ref HEAD when a repo is created with a non-master ↵techknowlogick2020-07-081-0/+7
| | | | | | | default branch (#12135) (#12182) This fixes an issue I noticed with #10803: when you create a repo with a non-master default branch, gitea doesn't change the remote ref HEAD, so it still points at refs/heads/master. As a result, cloning my repos gives me error messages and doesn't check out the desired default branch, so I need to manually check it out after cloning. Co-authored-by: xenofem <45297511+xenofem@users.noreply.github.com>
* Trim to 255 runes instead of bytes (#12150)Jürgen Hötzel2020-07-071-4/+5
| | | | | | | | | | | | | | * Trim to 255 runes instead of bytes Prevents invalid UTF-8 encoding for Description and Website. Refs #7905 * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Ensure Subkeys are verified (#12155) (#12168)zeripath2020-07-061-1/+41
| | | | | | | | | | | | | | | | | Backport #12155 When attempting to verify subkeys the email address verification step requires checking the emails however, these emails are not stored on subkeys but instead on the primary key. This PR will obtain the primaryKey and check against these emails too. Fix #12128 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use hash of repo path, ref and entrypath as cache key (#12151) (#12161)Lauris BH2020-07-061-2/+8
|
* Multiple small admin dashboard fixes (#12153) (#12156)zeripath2020-07-055-10/+16
| | | | | | | | * Prevent (EXTRA string) comments in Task headers * Redirect tasks started from monitor page back to monitor * Fix #12107 - redirects from process cancel should use AppSubUrl * When wrapping queues set the name correctly Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove spurious logging (#12139) (#12148)zeripath2020-07-051-3/+0
| | | | | | | | | | | | Backport #12139 Unfortunately #10745 merged a spurious logging message. This PR removes this. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* templates/repo/empty.tmpl : fix repo setup instructions (#12147)Andreas Shimokawa2020-07-051-1/+1
| | | | Co-authored-by: codeberg <codeberg@codeberg.org> Co-authored-by: zeripath <art27@cantab.net>
* Move EventSource to SharedWorker (#12095) (#12130)zeripath2020-07-059-37/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move EventSource to SharedWorker (#12095) Backport #12095 Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1 open browser connections from preventing gitea from opening multiple tabs. Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating Fix #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io> * Bugfix for shared event source For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net> * Re-fix #12095 again Unfortunately some of the suggested changes to #12095 introduced bugs which due to caching behaviour of sharedworkers were not caught on simple tests. These are as follows: * Changing from simple for loop to use includes here: ```js register(port) { if (!this.clients.includes(port)) return; this.clients.push(port); port.postMessage({ type: 'status', message: `registered to ${this.url}`, }); } ``` The additional `!` prevents any clients from being added and should read: ```js if (this.clients.includes(port)) return; ``` * Dropping the use of jQuery `$(...)` selection and using DOM `querySelector` here: ```js async function receiveUpdateCount(event) { try { const data = JSON.parse(event.data); const notificationCount = document.querySelector('.notification_count'); if (data.Count > 0) { notificationCount.classList.remove('hidden'); } else { notificationCount.classList.add('hidden'); } notificationCount.text() = `${data.Count}`; await updateNotificationTable(); } catch (error) { console.error(error, event); } } ``` Requires that `notificationCount.text()` be changed to use `textContent` instead. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix ui bug in wiki commit page (#12089) (#12125)赵智超2020-07-031-2/+9
| | | | | | | | | | | | | | | * Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>