Commit graph

7034 commits

Author SHA1 Message Date
silverwind
44759fd66c Add proper CORS preflight origin validation (#5740) 2019-01-15 23:16:45 -05:00
GiteaBot
ca3b9aa6a3 [skip ci] Updated translations via Crowdin 2019-01-15 21:33:19 +00:00
Harshit Bansal
1ac8f6fb83 Don't list an issue on its own dependency list UI. (#5658)
Fixes: #4684.
2019-01-15 16:31:35 -05:00
Lunny Xiao
270fa6d63b Support CORS headers to git smart http protocol (#5719) 2019-01-14 16:05:27 -05:00
GiteaBot
5a081c7a80 [skip ci] Updated translations via Crowdin 2019-01-14 19:17:19 +00:00
Khaled Hamed
bd75965296 Prioritize "readme.md" (#5691)
* prioritize readme.md

* Improve IsReadmeFile

* Add more tests
2019-01-14 14:15:06 -05:00
zeripath
6868378673 Ensure that sessions are passed into queries that could use the database to prevent deadlocks (#5718)
* Fixed deadlock in CreateComment

* Fix possible deadlock in UpdateIssueDeadline from createDeadlineComment

* Ensure that calls to IsTimeTracker enabled are called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that calls to reactionList are also called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure all calls in NewPullRequest with the session are called within the session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Deal with potential deadlocks in repo

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that isStaring is checked within our transaction

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix mistake in isOrganizationMember

Sorry.
2019-01-13 21:29:58 -05:00
Zsombor
656456441c Add flag to skip repository dumping (#5695) 2019-01-13 16:52:25 -05:00
techknowlogick
5c44f751a3
Discord Oauth2 support (#4476)
* add discord auth

* add vendor for discord

* fix syntax error

* make fmt

* update version of goth in use

* update markbates/goth
2019-01-13 14:06:22 -05:00
Lunny Xiao
beab2df122 Refactor mail notification (#5110)
* mail notification implement interface

* fix file comment year

* use NullNotifier as parent struct of notifiers
2019-01-13 16:42:55 +02:00
Julian
e5228b8369 fix: use correct value for "MSpan Structures Obtained" #4742 (#5706)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
2019-01-12 17:49:44 -05:00
Lanre Adelowo
9e9d1b8f95 Fix migration for user defined themes (#5682) 2019-01-12 14:43:47 -05:00
zeripath
2b36bdd490 Do not display the raw OpenID error in the UI (#5705)
* Do not display the raw OpenID error in the UI

If there are no `WHITELIST_URIS` or `BLACKLIST_URIS` set in the openid
section of the app.ini, it is possible that gitea can leak sensitive
information about the local network through the error provided by the
UI. This PR hides the error information and logs it.

Fix #4973

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update auth_openid.go

Place error log within the `err != nil` branch.
2019-01-12 14:24:47 -05:00
GiteaBot
bf7a11254d [skip ci] Updated translations via Crowdin 2019-01-12 16:15:40 +00:00
Julian
f59bfe893a docker: stop modifying file permission before migrating database (#5707) 2019-01-12 11:14:01 -05:00
Lanre Adelowo
abb364f442 allow user fork repo even when as a guest.. This will prompt the user to login and if authentication was successful, the user will be redirected to fork the repo (#5690) 2019-01-10 23:25:14 -05:00
GiteaBot
6630a33ec1 [skip ci] Updated translations via Crowdin 2019-01-11 04:00:31 +00:00
Shikiryu
915278f237 Add docs about database migration (#5661)
* Add docs about database migration

* Reorder upgrade from Gogs steps
2019-01-10 22:58:28 -05:00
Zsombor
31aa00fa4b Update xorm to fix issue #5659 and #5651 (#5680) 2019-01-09 17:18:06 -05:00
zeripath
dd13327382 When redirecting clean the path to avoid redirecting to //www.othersite.com (#5669)
Fix #5627

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-09 13:39:01 -05:00
Lunny Xiao
0b84b5ee49 fix public will not be reused as public key after deleting as deploy key (#5671) 2019-01-09 13:10:46 -05:00
Lanre Adelowo
530c2b8ad8 document command line flags (#5675) 2019-01-09 12:52:10 -05:00
GiteaBot
c04fc677b5 [skip ci] Updated translations via Crowdin 2019-01-09 17:24:47 +00:00
Lanre Adelowo
8d2c24f7f9 Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme

* update user themem

* use right text on button

* load theme based on users' selection

* load theme based on users' selection in pwa too

* update sample config

* delete older theme loading

* implement AfterLoad to set users' theme properly

* set up default theme when creating a user. This uses the installation wide theme

* use flash messages for error

* set default theme when creating a user from the cli

* fix @lunny review
2019-01-09 12:22:57 -05:00
Jan Breuer
ea518681d9 Translate home template to Czech (#5665)
Signed-off-by: Jan Breuer <jan.breuer@jaybee.cz>
2019-01-08 14:39:50 +01:00
gdeverlant
d3dc07f282 Added URL mapping for Release attachments like on github.com (#1707) 2019-01-06 17:37:30 -05:00
Harshit Bansal
dd006db5a7 Display branch name in delete branch confirmation modal. (#5654)
Fixes: #5630.
2019-01-06 15:08:25 -05:00
Julian
c42bde719e Only count users own actions for heatmap contributions (#5647)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
2019-01-06 21:29:05 +02:00
Julian
97dafdc057 fix commit page showing status for current default branch (#5650)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
2019-01-06 16:32:00 +02:00
Pierre-Alexis Ciavaldini
0236856924 migrate database if app.ini found (#5290)
* migrate database if app.ini found

* replacing hard-coded user id by env variable

* Update per @zeripath's feedback
2019-01-05 13:16:38 -05:00
Dane
cbc14df16a Add docs on passing SSH through to container (#5019)
* Add docs on passing SSH through to container

Wasn't clear how to pass SSH connections through the container, found a
few blog posts which described roughly the same procedure I've
documented here.

Credit should really go to:

* https://blog.sakuragawa.moe/gitea-in-docker-container-and-sharing-ssh-with-host/
* http://www.ateijelo.com/blog/2016/07/09/share-port-22-between-docker-gogs-ssh-and-local-system

Signed-off-by: Dane Elwell <dane.elwell@ukfast.co.uk>

* Add note to resolve @lafriks feedback
2019-01-05 12:53:23 -05:00
zeripath
6311e4ce6a Fix sqlite deadlock when assigning to a PR (#5640)
* Fix sqlite deadlock when assigning to a PR

Fix 5639

Signed-off-by: Andrew Thornton <art27@cantab.net>

* More possible deadlocks found and fixed

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-04 16:51:27 -05:00
Jonas Franz
9e901039e7
Add changelog for 1.6.3 and 1.7.0-rc2 (#5636)
* Add changelog for 1.6.3 and 1.7.0-rc2

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add missing point for 1.6.3

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2019-01-04 18:44:26 +01:00
GiteaBot
405414d14e [skip ci] Updated translations via Crowdin 2019-01-04 16:16:40 +00:00
zeripath
fd1e8563f8 SECURITY: protect DeleteFilePost et al with cleanUploadFileName (#5631)
This commit wraps more of the TreePaths with cleanUploadFileName

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-04 11:08:26 -05:00
GiteaBot
5a1ea37f57 [skip ci] Updated translations via Crowdin 2019-01-04 09:23:34 +00:00
Harshit Bansal
9f476b8d1e Don't close issues via commits on non-default branch. (#5622)
Adds a small check to close the issues only if the referencing commits
are on the default branch.

Fixes: #2314.
2019-01-04 11:22:58 +02:00
0x5c
0de57fd57c Documentation: Clarity for HTTPS setups (#5626)
[https-setup]
- Made it clearer that HTTP redirection is possible
[config-cheat-sheet]
- Clarified the behavihour of the redirection-related config keys
2019-01-03 16:46:07 +01:00
GiteaBot
9863591dca [skip ci] Updated translations via Crowdin 2019-01-03 10:19:43 +00:00
Jonas Franz
121da08730
Add changelog for 1.7.0-rc1 (#5616)
* Add changelog for 1.7.0-rc1

* Change position of refactoring of heatmap

* Refactoring some items in changelog

* Fix wrong PR title in changelog

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Remove backported PRs

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix wrong date

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add new PR to list

* Security fixes have been backported
2019-01-03 11:17:28 +01:00
Moshi Binyamini
76060613ef Fix bug on modifying sshd username (#5624)
Should fix #5623
2019-01-02 17:42:33 -05:00
techknowlogick
74b9a13f84
Update @jonasfranz's username (#5619)
* Update @jonasfranz's username

* lowercase'd username
2019-01-02 13:35:18 -05:00
techknowlogick
7c3722b366
Update owners & Date in contributing (#5620) 2019-01-02 13:00:19 -05:00
GiteaBot
f5be13efb6 [skip ci] Updated translations via Crowdin 2019-01-02 12:59:14 +00:00
Harshit Bansal
8764f1512d branch: Trigger update when deleting branch via UI. (#5617)
Fixes: #5309.
2019-01-02 20:56:58 +08:00
Rodrigo Villablanca Vásquez
4c52858c39 Issue is not overdue when it is on the same date #5566 (#5568)
* Due date time of issues and milestones is set to 23:59:59

* Add docs

* make gen swagger

* fix swagger gen
2019-01-01 18:56:47 +01:00
Harshit Bansal
63bd1b9203 mirror: Delete tags in mirror which are removed for original repo. (#5609)
This bug was being caused by an error in the logic in `release.go`.
Credit to @yasuokav for tracing the root of the issue.

Fixes: #5192.
2018-12-31 18:00:54 -05:00
Daniel Wolf
b46c279587 update v71.go to resolve #5595 (#5613) 2018-12-31 21:23:03 +08:00
GiteaBot
64995bae0f [skip ci] Updated translations via Crowdin 2018-12-31 12:03:07 +00:00
Harshit Bansal
2c7661a524 Fix wrong text getting saved on editing second comment on an issue. (#5608)
* comments: Fix an incorrent DOM element selection.

This commit fixes a bug that was causing text from previously edited
comment to get saved when two comments were edited one after other.
Text area with id of `#content` isn't unique on the page but it was
being treated as unique by the event handling code.

Fixes: #5581.

* templates: Remove `id` from textarea in commit edit form.

An element is assigned an `id` only if it is unique for the whole page
but in this case there can be multiple textarea so it should have one.
2018-12-31 13:01:20 +01:00