summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Fix missing authorization check on pull for public repos of private/limited ↵Cirno the Strongest2020-05-291-0/+11
| | | | | | | org (#11656) (#11683) Fixes #11651 (cherry picked from commit 02fa329a7c2190d947cd5e02ea90d2d4406653be)
* Fix commit page js error (1.11 backport) (#11527)silverwind2020-05-201-0/+2
| | | | | Partial backport of https://github.com/go-gitea/gitea/commit/fd094eea959a235654b7591da066dcbbee11fc25 to 1.11. Fixes: https://github.com/go-gitea/gitea/issues/11518
* Whenever the ctx.Session is updated, release it to save it before sending ↵zeripath2020-05-186-100/+168
| | | | | | | | | the redirect (#11456) (#11457) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Forcibly clean and destroy the session on logout (#11447) (#11451)zeripath2020-05-171-5/+2
| | | | | | | | | Backport #11447 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix /api/v1/orgs/* endpoints by changing parameter to :org from :orgname ↵65432020-05-121-3/+3
| | | | (#11381)
* Fix tracked time issues (#11349) (#11354)guillep2k2020-05-091-0/+5
| | | | | | | | | | | | | | | | | | Backport #11349 * Fix tracked time issues (#11349) * Fix nil exeption: #11313 * fix 500 * activate test 😆 * move logic * Add missing import Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
* When delete tracked time through the API return 404 not 500 (#11319) (#11326)65432020-05-071-1/+5
|
* Show pull request selection even when unrelated branches (#11239) (#11283)guillep2k2020-05-041-3/+0
| | | | | | | | Fix #10525 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* repo: milestone: make /milestone/:id endpoint accessible (#11264) (#11282)Kyle Evans2020-05-041-3/+8
| | | | | | | | | | | | Previously, this required authentication, but there's not actually any privileged information on this page. Move the endpoint out of the group that requires sign-in. It still requires the ability to read issues and pull requests, so private repositories (for instance) will not be exposed. Fixes #10312 Fixes #11233 Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Prevent clones and pushes to disabled wiki (#11131) (#11134)zeripath2020-04-192-1/+33
| | | | | Backport #11131 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix merge dialog on protected branch with missing required statuses (#11074) ↵65432020-04-161-3/+1
| | | | | | | (#11084) It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet. Fix #10636 by adding case: missing StatusChecks when these are missing
* Fix milestones too many SQL variables bug (#10880) (#10904)Lunny Xiao2020-03-312-84/+63
| | | | | | | | | * Fix milestones too many SQL variables bug * Fix test * Don't display repositories with no milestone and fix tests * Remove unused code and add some comments
* Protect against NPEs in notifications list (#10879) (#10883)zeripath2020-03-301-3/+18
| | | | | | | | | | | | | | | | | | | | | | * Protect against NPEs in notifications list (#10879) Unfortunately there appears to be potential race with notifications being set before the associated issue has been committed. This PR adds protection in to the notifications list to log any failures and remove these notifications from the display. References #10815 - and prevents the panic but does not completely fix this. Signed-off-by: Andrew Thornton <art27@cantab.net> * add log import * Update models/notification.go Co-Authored-By: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Convert plumbing.ErrReferenceNotFound to git.ErrNotExist in GetRefCommitID ↵zeripath2020-03-231-3/+1
| | | | | | | | | | | | | | | | | (#10676) (#10797) * Fix panic in API pulls when headbranch does not exist (#10676) Backport #10676 * Fix panic in API pulls when headbranch does not exist * refix other reference to plumbing.ErrReferenceNotFound Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv>
* Fix bug on branch API (#10767) (#10775)Lunny Xiao2020-03-201-2/+15
| | | | | * Fix bug on branch API (#10767) * Fix branch api canPush and canMerge
* Migrate to go-git/go-git v5.0.0 (#10735) (#10753)Lauris BH2020-03-182-4/+5
|
* Prevent panic in stopwatch (#10670) (#10673)zeripath2020-03-081-2/+5
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Issue writers perms can modify issues (#10623) (#10626)John Olheiser2020-03-061-0/+2
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Handle deleted base branch in PR (#10618) (#10619)Lauris BH2020-03-051-0/+10
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Logout POST action (#10582) (#10585)John Olheiser2020-03-031-1/+1
| | | | | | | | | * Change logout to POST * Update for redirect * Revert octicon to font Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Admin page for managing user e-mail activation (#10557) (#10579)guillep2k2020-03-024-2/+230
| | | | | | | | | | | | | | | | | | * Admin page for managing user e-mail activation (#10557) * Implement mail activation admin panel * Apply suggestions by @lunny * Add UI for user activated emails * Prevent admin from self-deactivate; add modal Co-authored-by: zeripath <art27@cantab.net> * Fix pagination options downgrade Co-authored-by: zeripath <art27@cantab.net>
* Fix redirection path if Slack webhook channel is invalid (#10566)James Lakin2020-03-021-2/+2
| | | The path to the hook config is already defined by orgRepoCtx
* Fix 404 after activating secondary email (backport of #10547) (#10553)Andreas Shimokawa2020-03-011-1/+1
|
* Show Signer in commit lists and add basic trust (#10425) (#10524)zeripath2020-02-285-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | Backport #10425 Backport #10511 * Show Signer in commit lists and add basic trust (#10425) Show the avatar of the signer in the commit list pages as we do not enforce that the signer is an author or committer. This makes it clearer who has signed the commit. Also display commits signed by non-members differently from members and in particular make it clear when a non-member signer is different from the committer to help reduce the risk of spoofing. Signed-off-by: Andrew Thornton <art27@cantab.net> Fix the signing icon in the view_list.tmpl page (#10511) Co-Authored-By: silverwind <me@silverwind.io> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix potential bugs (#10513) (#10518)65432020-02-282-5/+5
| | | | | | * use e if it is an option * potential nil so check err first * check err first * m == nil already checked
* Handle push rejection message in Merge & Web Editor (#10373) (#10497)zeripath2020-02-274-15/+52
| | | | | | | | | | | | | | Backport #10373 * Handle push rejection message in Merge * Fix sanitize, adjust message handling * Handle push-rejection in webeditor CRUD too Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix double PR notification from API (#10482) (#10486)John Olheiser2020-02-261-3/+0
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix admin notices (#10480) (#10483)John Olheiser2020-02-261-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change admin dashboard to POST (#10465) (#10466)John Olheiser2020-02-252-11/+20
| | | | | | | | | | | | * Change admin dashboard to POST (#10465) * Add form and convert to POST * Redirect for flash * Convert octicons back to fa for 1.11 Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change action GETs to POST (#10462) (#10464)John Olheiser2020-02-251-6/+6
| | | | | | | | | | | | | | | | | | * Change action GETs to POST * submite = submit + smite * No more # href * Fix test * Match other tests * Explicit csrf Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Trigger webhooks on issue label-change via API too (#10421) (#10439)65432020-02-241-36/+29
| | | | | | | | | | | | | * trigger webhooks with api too * fix comment * notify report old too * CI restart * restart CI again * remove duplicated code
* Various fixes in login sources (#10428) (#10429)zeripath2020-02-238-0/+19
| | | | Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix followers and following tabs in profile (#10202) (#10203)Lauris BH2020-02-092-38/+19
|
* Fix push-create SSH bugs (#10145) (#10151)John Olheiser2020-02-051-1/+11
| | | | | | | | | | | | | * Attempt to fix push-create SSH bugs Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix binding Signed-off-by: jolheiser <john.olheiser@gmail.com> * Invalid ctx Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Prevent DeleteUser API abuse (#10125) (#10128)65432020-02-032-1/+7
| | | | | * fix & co * word suggestions from @jolheiser
* working part of #9998 (#10114) (#10115)65432020-02-031-2/+6
| | | | | | Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Fix branch page pull request title and link error (#10092) (#10097)Lunny Xiao2020-02-011-1/+1
| | | | * Fix branch page pull request title and link error (#10092)
* Fix milestone API state parameter unhandled (#10049) (#10052)Lunny Xiao2020-01-292-2/+7
| | | | | * Fix milestone API state parameter unhandled * Fix test
* Ensure that feeds are appropriately restricted (#10018) (#10019)zeripath2020-01-282-7/+19
| | | | | | * Ensure that feeds are appropriately restricted * Placate golangci-lint
* Fix wiki raw view on sub path (#10002) (#10040)Lunny Xiao2020-01-282-18/+11
| | | | | | | * Fix wiki raw view on sub path * Add test for subpath wiki raw file * Fix bug
* Fix wrong hint when status checking is running on pull request view (#9886) ↵Lunny Xiao2020-01-222-10/+12
| | | | | | | | | | | | | | | | | (#9928) * Fix wrong hint when status checking is running on pull request view * fix lint * fix test * fix test * fix wrong tmpl * fix import * rename function name
* Add option to prevent LDAP from deactivating everything on empty search ↵zeripath2020-01-201-0/+1
| | | | | | | | | | | (#9879) (#9896) * Add option to prevent LDAP from deactivating everything on empty search * Update options/locale/locale_en-US.ini Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wrong permissions check when issues/prs shared operations (#9885) (#9889)Lunny Xiao2020-01-207-24/+33
| | | | | | | | | | * Fix wrong permissions check when issues/prs shared operations * move redirect to the last of the function * fix swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Ensure that 2fa is checked on reset-password (#9857) (#9876)zeripath2020-01-191-8/+75
| | | | | | | | | | | | | | * Ensure that 2fa is checked on reset-password * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv> * Properly manage scratch_code regeneration Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix issues/pulls dependencies problems (#9842) (#9864)Lunny Xiao2020-01-194-22/+45
| | | | | | | * Fix issues/pulls dependencies problems * fix swagger and api param name * fix js
* fix (#9837)65432020-01-171-1/+7
|
* Fix download file wrong content-type (#9825) (#9834)Lunny Xiao2020-01-171-1/+7
| | | | | | | | | | * Fix download file wrong content-type * change the error text to be more precise * fix test Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix wrong identify poster on a migrated pull request when submi… (#9827) ↵Lunny Xiao2020-01-171-1/+1
| | | | (#9830)
* Fix compare (#9808) (#9814)Lunny Xiao2020-01-171-24/+20
| | | | | | Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix push-to-create (#9772) (#9797)John Olheiser2020-01-161-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | * Fix push-to-create Signed-off-by: jolheiser <john.olheiser@gmail.com> * Check URL path and service Signed-off-by: jolheiser <john.olheiser@gmail.com> * Send dummy payload on receive-pack GET Signed-off-by: jolheiser <john.olheiser@gmail.com> * The space was actually a NUL byte Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use real bare repo instead of manufactured payload Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net>