71 Commits

Author SHA1 Message Date
ᴊᴏᴇ ᴄʜᴇɴ adea243ee8 feat(web): migrate account activation page to React (#8296) 2026-05-24 22:35:41 -04:00
ᴊᴏᴇ ᴄʜᴇɴ 83a48c286d fix: remove forgeable remember-me cookie, persist sessions by default (#8289) 2026-05-22 16:24:39 -04:00
ᴊᴏᴇ ᴄʜᴇɴ f739682e9a Move sign-in MFA step to React with /api/web/user/mfa (#8288) 2026-05-22 15:33:06 -04:00
ᴊᴏᴇ ᴄʜᴇɴ d54f98f5a4 feat(web): adopt Pierre theme palette and reorder sign-in tab stops (#8287) 2026-05-22 11:19:38 -04:00
ᴊᴏᴇ ᴄʜᴇɴ dd6be39208 feat: React-based sign-in page with /api/web/user/sign-in (#8285) 2026-05-22 00:28:27 -04:00
ᴊᴏᴇ ᴄʜᴇɴ 90790b2966 Embed WebContext and add /api/web/user-info endpoint (#8282) 2026-05-21 14:43:09 -04:00
ᴊᴏᴇ ᴄʜᴇɴ b67c13c6bb feat: introduce React web frontend and migrate home + 404 pages (#8276) 2026-05-20 17:45:31 -04:00
ᴊᴏᴇ ᴄʜᴇɴ 0089c4c8e5 auth: trust reverse proxy auth header only from configured proxies (#8264) 2026-05-18 13:42:46 -04:00
ᴊᴏᴇ ᴄʜᴇɴ 36d56d5525 all: rename packages ending with "util" to end with "x" (#8182)
Co-authored-by: JSS <jss@unknwon.dev>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:25:19 -05:00
ᴊᴏᴇ ᴄʜᴇɴ 295bfba729 context: reject access tokens passed via URL query parameters (#8177) 2026-02-13 15:27:48 -05:00
ᴊᴏᴇ ᴄʜᴇɴ 48500aa2b0 all: migrate from satori/go.uuid to google/uuid (#8161) 2026-02-08 00:13:43 -05:00
Copilot bf17cc6c69 Replace github.com/unknwon/com with stdlib and internal helpers (#8148)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 22:08:54 -05:00
Copilot 6d56105f8f Run modernize tool across codebase (#8147)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2026-02-05 21:32:09 -05:00
Sino 87c8faaf08 Standardize HTTP status codes (#7851)
Co-authored-by: Joe Chen <jc@unknwon.io>
2026-01-30 09:27:59 -05:00
Copilot 4ee706b2bf chore: replace pkg/errors with cockroachdb/errors (#8098)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
2026-01-22 08:20:53 -05:00
ᴊᴏᴇ ᴄʜᴇɴ 59e9fa191b chore: remove all MIT license file headers (#8083)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2026-01-08 19:32:15 -05:00
dependabot[bot] 139ea3ce7d mod: bump modernc.org/sqlite from 1.36.0 to 1.37.0 (#7947)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
2025-04-14 18:00:07 -04:00
Joe Chen d9ecdcaef0 all: unwrap database.UsersStore interface (#7708) 2024-03-27 23:18:59 -04:00
Joe Chen 4d05804729 all: unwrap database.RepositoriesStore interface (#7706) 2024-03-26 23:34:31 -04:00
Joe Chen 5cf0189df1 all: unwrap database.PermissionsStore interface (#7701) 2024-03-23 20:46:32 -04:00
Joe Chen 8054ffc12f all: unwrap database.AccessTokensStore interface (#7670) 2024-02-20 21:47:32 -05:00
Joe Chen 3650b32ec5 chore: rename internal/db to internal/database (#7665) 2024-02-18 19:39:41 -05:00
Joe Chen 8350daf505 refactor(db): merge relation stores into entity stores (#7341) 2023-02-08 13:55:54 +08:00
Joe Chen c53a1998c5 all: replace interface{} with any (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2023-02-02 21:25:25 +08:00
Joe Chen 5fb29db2db refactor(db): migrate methods off and delete deprecated methods from user.go (#7231) 2022-11-05 23:33:05 +08:00
Joe Chen b5d47b9692 refactor(db): migrate methods off user.go (#7230) 2022-11-05 18:56:48 +08:00
Mateusz Reszka 742bc36edd api: support put content (#7114)
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-10-22 23:52:48 +08:00
Yang Liu b9f5cfddc1 auth: enable authentication by token from password (#7198)
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-10-22 21:25:36 +08:00
Joe Chen 7cbd84d5b3 refactor(db): rename User.Passwd to User.Password (#7196) 2022-10-22 14:56:25 +08:00
Joe Chen 8982a42d38 refactor(db): move User.HasForkedRepository to users.HasForkedRepository (#7176)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-10-09 22:55:32 +08:00
Joe Chen 083c3ee659 db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-06-25 18:07:39 +08:00
Joe Chen 1df62fafb9 db: use context and go-mockgen for ReposStore (#7046) 2022-06-11 12:43:56 +08:00
Joe Chen f837ea6346 db: use context and go-mockgen for UsersStore (#7042) 2022-06-11 09:42:17 +08:00
Joe Chen 7229dd893f db: use context and go-mockgen for PermsStore (#7033) 2022-06-08 19:26:20 +08:00
Joe Chen fe1d07f29c db: rename AccessTokensStore.Save to Touch (#7029) 2022-06-08 13:34:10 +08:00
Joe Chen 0a92ad27ef db: use context and go-mockgen for AccessTokensStore (#7013) 2022-06-06 12:10:36 +08:00
E99p1ant a328e7ccc4 access_token: encrypt access token with SHA256 (#7008)
* access_token: encrypt access token with SHA256

* revert list access token

* fix lint

* generate schemadoc

* add database migrations

* fix tests

* fix tests

* add test case for access token golden

* fix test in postgres

* `Sha256` -> `SHA256`

* Use GORM for migration

* task generate-schemadoc

* Use unique

* change migration name

* allow read

* task generate-schemadoc

* add changelog

* fix lint error

* update changelog

* remove Debug

* add comments

Co-authored-by: Joe Chen <jc@unknwon.io>
2022-06-05 13:34:21 +08:00
Toby Simmons d54e153fc8 csrf: sanitize token after reading from cookie (#6969)
Co-authored-by: Joe Chen <jc@unknwon.io>
2022-05-26 23:56:14 +08:00
Joe Chen f45dbf3e76 chore: watch "custom" directory in dev and use lowercase for header value (#6927) 2022-05-03 17:54:14 +08:00
deepsource-autofix[bot] 2466da4e82 autofix: fix nested if with else if (#6807)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 16:39:14 +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] 2d609b8b31 autofix: types of function parameters can be combined (#6800)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-03-06 15:59:45 +08:00
Atin d6987ee05b chore: fix typos in code comments (#6556) 2021-05-19 13:12:09 +08:00
weibaohui c7f58ca870 templates: fix typo of BranchCount (#6370)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-11-24 23:13:40 +08:00
Matheus Mosca 997ba0fef0 context: add X-Frame-Options header (#6411)
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-11-11 12:17:43 +08:00
E99p1ant fd765bd88f context: fix Access-Control-Allow-Credentials header typo (#6381) 2020-10-10 23:09:42 +08:00
ᴜɴᴋɴᴡᴏɴ 2eaf1d693a db: migrate access table to use GORM (#6371) 2020-10-06 15:43:28 +08:00
ᴜɴᴋɴᴡᴏɴ 3af91d7cfd auth: decouple types and functions from db (#6320) 2020-09-20 11:19:02 +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
ᴜɴᴋɴᴡᴏɴ 178b73fecd repo: users have access to base repository can also view forks (#6261) 2020-08-22 13:17:45 +08:00