Joe Chen
ce25881c88
refactor(db): move some methods off `user.go` ( #7199 )
2022-10-22 20:01:38 +08:00
Joe Chen
7cbd84d5b3
refactor(db): rename `User.Passwd` to `User.Password` ( #7196 )
2022-10-22 14:56:25 +08:00
Joe Chen
c502dc6ed8
refactor(db): move some methods from `user.go` to `users.go` ( #7195 )
2022-10-22 14:41:40 +08:00
Joe Chen
50e5766867
build: remove support of Go 1.17 ( #7177 )
2022-10-09 23:12:03 +08:00
Joe Chen
75fbb82440
db: use `context` for backup and restore ( #7044 )
2022-06-11 11:10:25 +08:00
shlande
318fb25761
web: enable `ETag` to improve loading speed of static resources ( #7035 )
...
Co-authored-by: shlande <shlandeme@icloud.com>
2022-06-09 09:48:03 +08:00
Joe Chen
7229dd893f
db: use `context` and go-mockgen for `PermsStore` ( #7033 )
2022-06-08 19:26:20 +08:00
Joe Chen
04d3946511
web: print accessible URL on startup ( #6979 )
2022-05-29 19:45:40 +08:00
Joe Chen
cb35b73048
attachment: set CSP header in the serving endpoint ( #6926 )
2022-05-03 17:51:28 +08:00
4e4o
f2c3027f50
restore: fix incorrect existence checking of "repositories.zip" ( #6914 )
2022-04-27 10:32:13 +08:00
Joe Chen
f37cd9672c
restore: clean up leftover and invalid chars ( #6875 )
2022-03-26 15:10:39 +08:00
Michael Li
32c454ba5f
assets: convert usage of go-bindata to Go embed ( #6851 )
...
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-03-17 14:05:09 +08:00
deepsource-autofix[bot]
e452d94fc8
autofix: format code with gofumpt and gofmt ( #6803 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 17:55:17 +08:00
deepsource-autofix[bot]
5afca6ca8e
autofix: function call can be replaced with helper function ( #6805 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:33:55 +08:00
deepsource-autofix[bot]
deec3516d5
autofix: fix check for empty string ( #6804 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:33:45 +08:00
deepsource-autofix[bot]
3acc13038d
autofix: unused parameter should be replaced by underscore ( #6799 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 15:46:21 +08:00
Joe Chen
fa3d011415
chore: fix lint errors ( #6620 )
2021-09-24 00:44:09 +08:00
James-REANNZ
8f6757cc7b
web: correctly handle go-get pages for repository roots ( #6598 )
...
Fixes regression in go-get handling introduced in #6318 .
2021-08-26 13:12:51 +08:00
Atin
d6987ee05b
chore: fix typos in code comments ( #6556 )
2021-05-19 13:12:09 +08:00
ᴜɴᴋɴᴡᴏɴ
2eaf1d693a
db: migrate access table to use GORM ( #6371 )
2020-10-06 15:43:28 +08:00
ᴜɴᴋɴᴡᴏɴ
7bc3ee49aa
cmd/serv: use different log files for ORMs in hook mode ( #6361 )
2020-09-29 22:26:07 +08:00
ᴜɴᴋɴᴡᴏɴ
594a2dc41f
web: correctly serving go-get pages for subdirs ( #6318 )
...
* web: correctly serving go-get page for subdirs
* Update CHANGELOG
* Fix golint error
2020-09-09 20:14:48 +08:00
ᴜɴᴋɴᴡᴏɴ
9fd4f5562d
all: use semver to compare versions ( #6147 )
2020-05-04 18:48:23 +08:00
ᴜɴᴋɴᴡᴏɴ
9bb218734c
db: use GORM to backup and restore non-legacy tables ( #6142 )
2020-05-04 16:25:57 +08:00
ᴜɴᴋɴᴡᴏɴ
e79aebb3e1
route: bypass require signin check for trigger repo tasks ( #6079 )
...
* route: bypass require signin check for trigger repo tasks
* CHANGELOG
* Fix lint errors
2020-04-08 20:55:15 +08:00
ᴜɴᴋɴᴡᴏɴ
07818d5fa5
route: no session for routes without UI ( #6066 )
...
Not all routes need session, register session and CSRF middleware as global is a waste of resource, and creating a lot one-time off yet never used session records.
2020-04-05 06:36:08 +08:00
ᴜɴᴋɴᴡᴏɴ
53b91ef306
lfs: run e2e and fix minor issues ( #6059 )
2020-04-05 00:14:22 +08:00
ᴜɴᴋɴᴡᴏɴ
34145c990d
lfs: implement HTTP routes ( #6035 )
...
* Bootstrap with GORM
* Fix lint error
* Set conn max lifetime to one minute
* Fallback to use gorm v1
* Define HTTP routes
* Finish authentication
* Save token updated
* Add docstring
* Finish authorization
* serveBatch rundown
* Define types in lfsutil
* Finish Batch
* authutil
* Finish basic
* Formalize response error
* Fix lint errors
* authutil: add tests
* dbutil: add tests
* lfsutil: add tests
* strutil: add tests
* Formalize 401 response
2020-04-04 21:14:15 +08:00
ᴜɴᴋɴᴡᴏɴ
af0cfe112b
web: rename CSRF header ( #6027 )
2020-03-28 19:17:15 +08:00
ᴜɴᴋɴᴡᴏɴ
14cd16f1f8
csrf: set cookie HttpOnly and Secure ( #6013 )
2020-03-27 00:08:46 +08:00
Philidor Green
87053c5369
cmd: backup support exclude mirror repositories ( #6003 )
...
* cmd: backup support exclude mirror repositories
* Apply suggestions from code review
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-03-24 22:03:05 +08:00
ᴜɴᴋɴᴡᴏɴ
22717a1c06
webhook: overhaul route handlers ( #6002 )
...
* Overual route handlers and fixes #5366
* Merge routes for repo and org
* Inject OrgRepoContext
* DRY validateWebhook
* DRY c.HasError
* Add tests
* Update CHANGELOG
2020-03-22 22:07:22 +08:00
ᴜɴᴋɴᴡᴏɴ
82e511ddb1
cmd: init logging before `SetEngine` ( #6001 )
2020-03-22 14:11:52 +08:00
ᴜɴᴋɴᴡᴏɴ
5843038a08
workflows: enable golangci-lint ( #5998 )
...
* Create golint.yml
* Update golint.yml
* Update golint.yml
* Fix errcheck
* Fix gosimple
* Fix staticcheck
2020-03-21 13:39:32 +08:00
ᴜɴᴋɴᴡᴏɴ
958d8b6bb4
admin: use POST to run operations ( #5997 )
...
* admin: use POST to run operations
Fixed CSRF reported by Wenxu Wu of Tencent's Xuanwu Lab.
* Update CHANGELOG
2020-03-21 11:47:42 +08:00
ᴜɴᴋɴᴡᴏɴ
a43fc9ad17
ipynb: sanitize rendered HTML ( #5996 )
...
* ipynb: sanitize rendered HTML
Fixes #5170
* Remove hardcode URL
* Add tests
2020-03-21 00:12:38 +08:00
ᴜɴᴋɴᴡᴏɴ
9e9ca66467
refactor: unify error handling in routing layer
2020-03-16 01:22:27 +08:00
ᴜɴᴋɴᴡᴏɴ
6437d0180b
git: migrate to github.com/gogs/git-module@v1.0.0 ( #5958 )
...
* WIP
* Finish `internal/db/git_diff.go`
* FInish internal/db/mirror.go
* Finish internal/db/pull.go
* Finish internal/db/release.go
* Finish internal/db/repo.go
* Finish internal/db/repo_branch.go
* Finish internal/db/repo_editor.go
* Finish internal/db/update.go
* Save my work
* Add license header
* Compile!
* Merge master
* Finish internal/cmd/hook.go
* Finish internal/conf/static.go
* Finish internal/context/repo.go
* Finish internal/db/action.go
* Finish internal/db/git_diff.go
* Fix submodule URL inferring
* Finish internal/db/mirror.go
* Updat to beta.4
* css: update fonts
* Finish internal/db/pull.go
* Finish internal/db/release.go
* Finish internal/db/repo_branch.go
* Finish internal/db/wiki.go
* gitutil: enhance infer submodule UR
* Finish internal/route/api/v1/repo/commits.go
* mirror: only collect branch commits after sync
* mirror: fix tag support
* Finish internal/db/repo.go
* Finish internal/db/repo_editor.go
* Finish internal/db/update.go
* Finish internal/gitutil/pull_request.go
* Make it compile
* Finish internal/route/repo/setting.go
* Finish internal/route/repo/branch.go
* Finish internal/route/api/v1/repo/file.go
* Finish internal/route/repo/download.go
* Finish internal/route/repo/editor.go
* Use helper
* Finish internal/route/repo/issue.go
* Finish internal/route/repo/pull.go
* Finish internal/route/repo/release.go
* Finish internal/route/repo/repo.go
* Finish internal/route/repo/wiki.go
* Finish internal/route/repo/commit.go
* Finish internal/route/repo/view.go
* Finish internal/gitutil/tag.go
* go.sum
2020-03-08 19:09:31 +08:00
ᴜɴᴋɴᴡᴏɴ
931da04dc2
cmd/serv: improve hookMode handling ( #5960 )
...
- Allow remove primary logger at better location
- Use more appropriate log.Error to replace log.Fatal
2020-03-02 22:25:28 +08:00
ᴜɴᴋɴᴡᴏɴ
7382c23a17
cmd: init minimal logging config in hook mode
2020-03-02 01:01:52 +08:00
ᴜɴᴋɴᴡᴏɴ
f04b2d4350
lint: fix some Golang CI lint issues ( #5955 )
2020-03-01 14:55:03 +08:00
ᴜɴᴋɴᴡᴏɴ
17ae0ed3ee
conf: overhaul settings ( #5953 )
...
* Overhaul cache settings
* Overhaul HTTP settings
* conf: overhaul more settings
* log: make LGTM happy
* travis: upload report to Codecov
* Add codecov.yml
2020-02-29 16:29:17 +08:00
ᴜɴᴋɴᴡᴏɴ
d59b0f6ff7
conf: overhaul sessions settings ( #5952 )
2020-02-29 00:26:03 +08:00
ᴜɴᴋɴᴡᴏɴ
7950f2d17d
conf: overhaul auth and user settings ( #5942 )
...
* conf: overhaul auth and user settings
* ci: update travis Go versions
2020-02-27 18:06:38 +08:00
ᴜɴᴋɴᴡᴏɴ
52ffb67b33
conf: overhaul email settings ( #5940 )
2020-02-25 00:35:35 +08:00
ᴜɴᴋɴᴡᴏɴ
0d6c405ccb
cmd/web: fix wrong ExternalURL when specify port via CLI flag
...
Fixes #5936 .
2020-02-24 21:21:48 +08:00
ᴜɴᴋɴᴡᴏɴ
0c064b1b79
cmd/web: fix error when Unix socket not exists
2020-02-24 21:13:56 +08:00
ᴜɴᴋɴᴡᴏɴ
286fbc07e9
conf: overhaul security settings
2020-02-22 20:46:16 +08:00
ᴜɴᴋɴᴡᴏɴ
d3ecd22dba
cmd: fix unable to find correct custom config
2020-02-22 19:12:31 +08:00
ᴜɴᴋɴᴡᴏɴ
5efbde4fe9
conf: overhaul database settings
2020-02-22 18:58:16 +08:00