2
0
Commit Graph

156 Commits

Author SHA1 Message Date
Andrew
b7b9210c46 Two factor authentication support (#630)
* Initial commit for 2FA support

Signed-off-by: Andrew <write@imaginarycode.com>

* Add vendored files

* Add missing depends

* A few clean ups

* Added improvements, proper encryption

* Better encryption key

* Simplify "key" generation

* Make 2FA enrollment page more robust

* Fix typo

* Rename twofa/2FA to TwoFactor

* UNIQUE INDEX -> UNIQUE
2017-01-16 10:14:29 +08:00
Lunny Xiao
18a88b582a Update xorm and dependencies vendor for feature to dump to other database (#565)
* update xorm and dependencies vendor for feature to dump to other database

* fix golint
2017-01-03 16:20:28 +08:00
Bo-Yi Wu
f559cae3a5 fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-30 20:41:10 +01:00
Andrey Nering
36f6f4309c Notification - Step 1 (#523)
* Notification - Step 1

* Add copyright headers

* Cache issue and repository on notification model
2016-12-31 00:44:54 +08:00
Fabian Zaremba
3127448c1e Git LFS support v2 (#122)
* Import github.com/git-lfs/lfs-test-server as lfs module base

Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198

Removed:

Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md

* Remove config, add JWT support from github.com/mgit-at/lfs-test-server

Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83

* Add LFS settings

* Add LFS meta object model

* Add LFS routes and initialization

* Import github.com/dgrijalva/jwt-go into vendor/

* Adapt LFS module: handlers, routing, meta store

* Move LFS routes to /user/repo/info/lfs/*

* Add request header checks to LFS BatchHandler / PostHandler

* Implement LFS basic authentication

* Rework JWT secret generation / load

* Implement LFS SSH token authentication with JWT

Specification: https://github.com/github/git-lfs/tree/master/docs/api

* Integrate LFS settings into install process

* Remove LFS objects when repository is deleted

Only removes objects from content store when deleted repo is the only
referencing repository

* Make LFS module stateless

Fixes bug where LFS would not work after installation without
restarting Gitea

* Change 500 'Internal Server Error' to 400 'Bad Request'

* Change sql query to xorm call

* Remove unneeded type from LFS module

* Change internal imports to code.gitea.io/gitea/

* Add Gitea authors copyright

* Change basic auth realm to "gitea-lfs"

* Add unique indexes to LFS model

* Use xorm count function in LFS check on repository delete

* Return io.ReadCloser from content store and close after usage

* Add LFS info to runWeb()

* Export LFS content store base path

* LFS file download from UI

* Work around git-lfs client issue with unauthenticated requests

Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: https://github.com/github/git-lfs/issues/1088

* Fix unauthenticated UI downloads from public repositories

* Authentication check order, Finish LFS file view logic

* Ignore LFS hooks if installed for current OS user

Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.

* Hide LFS metafile diff from commit view, marking as binary

* Show LFS notice if file in commit view is tracked

* Add notbefore/nbf JWT claim

* Correct lint suggestions - comments for structs and functions

- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion

* Move secret generation code out of conditional

Ensures no LFS code may run with an empty secret

* Do not hand out JWT tokens if LFS server support is disabled
2016-12-26 09:16:37 +08:00
btrepp
4d7d9ecd4d Enables mssql support (#383)
* Enables mssql support

Port of dlobs work in gogs.
Enables options in index.js
Enables MSSQL as a database option in go.
Sets ID to 0 on initial migration. Required for
MSSQL insert statements.

Signed-off-by: Beau Trepp <beautrepp@gmail.com>

* Vendors in denisenkom/go-mssqldb

Includes golang.org/x/crypto/md4
as this is required by go-msssqldb

Signed-off-by: Beau Trepp <beautrepp@gmail.com>
2016-12-24 09:37:35 +08:00
Bwko
e5314f667c Catch os... errors 2016-12-02 07:41:19 +01:00
Lunny Xiao
7581fbcc92 golint fixed for models/models.go (#284) 2016-11-28 15:25:16 +08:00
Bwko
3e5d4a9a32 Lint models/org.go & models.go 2016-11-26 11:37:50 +01:00
Lunny Xiao
7ef5c88837 test database is connect OK after db config initialized (#239) 2016-11-24 22:30:36 +08:00
Sandro Santilli
acb138c244 Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Lunny Xiao
ce784fdfad use x.SQL instead of x.Sql 2016-11-10 15:20:48 +08:00
Joubert RedRat
630c0bbda5 Replace Gogs to Gitea in installation options 2016-11-07 13:26:19 -02:00
Rémy Boulanouar
61ec6729e6 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
LefsFlare
02b7f22643 Changed interface (#3685) 2016-09-22 19:38:12 -04:00
Unknwon
c5dea9e790 Web editor: support upload files 2016-08-30 05:23:59 -07:00
Unknwon
b36d801abe models/issue: improve quality and performance of NewIssue function 2016-08-15 18:40:32 -07:00
Unknwon
b04c5bf375 Code clean up 2016-08-12 03:04:50 -07:00
Unknwon
96928b6bc5 #3442 add test suites 2016-08-12 02:56:50 -07:00
Thibault Meyer
7efe3310e5 Fix #3437: Cannot connect to PostgreSQL via IPv6 address (#3442)
* Change PostgreSQL connstring parsing to handle IPv6

* Fix used variable

* Remove redundant code + use variable
2016-08-12 02:42:06 -07:00
Unknwon
8b42f56a13 models: rename EnableTidb to EnableTiDB 2016-08-11 14:38:45 -07:00
Unknwon
92c78cd75b #3013 support connect PostgreSQL via unix socket 2016-08-11 14:38:26 -07:00
Unknwon
a09fe55fb8 #3281 fix x.Iterate returns nothing inside session scope with SQLite3 2016-07-26 17:26:48 +08:00
Unknwon
631af92670 #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Tom
88c4f8eea2 getEngine() not handles DB parameters (#2972) (#2974) 2016-07-02 22:39:39 +08:00
Unknwon
dae318c33d #2302 Replace time.Time with Unix Timestamp (int64) 2016-03-09 19:53:30 -05:00
Lunny Xiao
b7b5961279 fix dependency broken because xorm's API changed 2016-02-16 22:35:08 +08:00
Unknwon
7136c29be9 fix #1902 2015-11-07 00:39:45 -05:00
Unknwon
677970b18e fix import path, fix #1782 2015-10-15 21:28:12 -04:00
Unknwon
4a92ace132 print log every time regulater timezone 2015-10-10 19:04:26 -04:00
Unknwon
478340d674 add log when cannot regulate time 2015-10-09 23:05:20 -04:00
Unknwon
6fa54b35e4 drop oauth2 feature support 2015-09-17 16:11:44 -04:00
Unknwon
5ca6821fe5 simplify names 2015-09-16 23:08:46 -04:00
Unknwon
62d02baa2b #1500 only regulateTimeZone for MySQL 2015-09-13 07:32:00 -04:00
Unknwon
0deca6f1b6 add tidb support 2015-09-12 15:31:36 -04:00
Unknwon
760a683dc2 #1500 timezone minutes offset 2015-09-11 12:33:27 -04:00
Unknwon
b409c3d62e more minor fix on 1581 2015-09-10 15:45:03 -04:00
Unknwon
e68815466c finish all new user settings UI 2015-09-10 11:40:34 -04:00
Unknwon
7df8c3eb50 new user profile settings UI
Signed-off-by: Unknwon <u@gogs.io>
2015-09-06 16:31:22 -04:00
Unknwon
2508b3a7f8 #1569 force InnoDB for MySQL 2015-09-03 05:05:58 -04:00
Unknwon
b25d674b85 PR: nothing to commit and has pull request check 2015-09-02 05:09:12 -04:00
Unknwon
5952498be0 work on PR conversation 2015-09-01 19:07:02 -04:00
Unknwon
465e068cec #1021 Forked repo unavailable after deleting original repo 2015-09-01 11:43:53 -04:00
Unknwon
637c505edd #1526 URL escape for username and password 2015-08-29 12:08:37 +08:00
Unknwon
2745423bd3 add webhook recent deliveries 2015-08-27 23:06:14 +08:00
Unknwon
cbb9ece7e8 fix release created timezone issue 2015-08-24 21:01:23 +08:00
Unknwon
9a78bac76c fix timezone! 2015-08-20 00:56:12 +08:00
Unknwon
4083ee3e3e add migrate from issue.label_ids to issue_label 2015-08-10 14:42:50 +08:00
Unknwon
a1b1352dbc #334: Add Deployment Key Support 2015-08-06 22:48:11 +08:00
Unknwon
0de79af8e1 fix mysql parsetime arg 2015-08-05 20:47:35 +08:00