Commit graph

13153 commits

Author SHA1 Message Date
2b44be9a17
Add a TODO list to notes 2022-04-21 20:53:41 -05:00
40f6ed2dd8
Add more notes about federated following 2022-04-21 20:53:41 -05:00
eed4644409
Add notes about remote users 2022-04-21 20:53:41 -05:00
3f77a36a2c
Add inbox/outbox notes 2022-04-21 20:53:40 -05:00
c1b8463251
Get federated following to work 2022-04-21 20:53:40 -05:00
608e4036e5
Actually follow local user when processing follow request 2022-04-21 20:53:40 -05:00
f9b38495fd
Rig up inbox/outbox to the API 2022-04-21 20:53:40 -05:00
d2c5df88eb
Implement inbox 2022-04-21 20:53:39 -05:00
2b243acf71
Implement outbox 2022-04-21 20:53:39 -05:00
KN4CK3R
95fdec2739
Implemented Webfinger endpoint. 2022-04-21 20:38:30 -05:00
9dfe4bc8a6
Move /#main-key to #main-key in tests 2022-04-21 20:36:27 -05:00
15427d5131
Make pubKey IRI #main-key instead of /#main-key 2022-04-21 20:36:27 -05:00
4937aab43d
Use named constant for httpsigExpirationTime 2022-04-21 20:36:27 -05:00
016d2d410b
Use system timezone instead of setting.DefaultUILocation 2022-04-21 20:36:27 -05:00
6e802b549d
Remove unneeded copy 2022-04-21 20:36:27 -05:00
273ffae0e4
Clean up some variable declarations 2022-04-21 20:36:26 -05:00
89a539815a
Check if digest algo is supported in setting module 2022-04-21 20:36:26 -05:00
d8c401dead
Use time.RFC1123 and make the http.Client proxy-aware 2022-04-21 20:36:26 -05:00
231ead4d48
Clean up whitespace with make fmt 2022-04-21 20:36:26 -05:00
f1ec41b339
Use the httplib module instead of http for GET requests 2022-04-21 20:36:26 -05:00
7d819f5e89
Rename hack_16834 to user_settings
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:25 -05:00
98664a7c84
Cleanup, handle invalid usernames for ActivityPub person GET request
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:25 -05:00
9c41737419
Assert if json.Unmarshal succeeds
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:25 -05:00
944d0afa9f
Remove LogSQL from ActivityPub person test
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:25 -05:00
6e13733898
Run make fmt again, fix err var redeclaration
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:25 -05:00
2d9f8e1f9b
Use Gitea JSON library, add assert for pkp
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:24 -05:00
764bbdbb70
Run make fmt and make generate-swagger
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:24 -05:00
d223aa69e3
Change 2021 to 2022, properly format package imports
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:24 -05:00
8e6b33b3e1
Fix CI checks-backend errors with go mod tidy
Signed-off-by: Anthony Wang <ta180m@pm.me>
2022-04-21 20:36:24 -05:00
Loïc Dachary
c946b9e3a4
activitypub: hack_16834
Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:24 -05:00
Loïc Dachary
550901e6fb
activitypub: implement the ReqSignature middleware
Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:23 -05:00
Loïc Dachary
f5a70ebe32
activitypub: signing http client
Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:23 -05:00
Loïc Dachary
fcbbf6dbe7
activitypub: go-fed conformant Clock instance
Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:23 -05:00
Loïc Dachary
eb3aaa2050
activitypub: add the public key to Person (#14186)
Refs: https://github.com/go-gitea/gitea/issues/14186

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:23 -05:00
Loïc Dachary
49db112ccf
activitypub: implement /api/v1/activitypub/user/{username} (#14186)
Return informations regarding a Person (as defined in ActivityStreams
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person).

Refs: https://github.com/go-gitea/gitea/issues/14186

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-04-21 20:36:23 -05:00
Loïc Dachary
66483a244b
go.mod: add go-fed/{httpsig,activity/pub,activity/streams} dependency
go get github.com/go-fed/activity/streams@master
go get github.com/go-fed/activity/pub@master
go get github.com/go-fed/httpsig@master
2022-04-21 20:36:22 -05:00
Gusted
ebe569a268
Set correct PR status on 3way on conflict checking (#19457)
* Set correct PR status on 3way on conflict checking

- When 3-way merge is enabled for conflict checking, it has a new
interesting behavior that it doesn't return any error when it found a
conflict, so we change the condition to not check for the error, but
instead check if conflictedfiles is populated, this fixes a issue
whereby PR status wasn't correctly on conflicted PR's.
- Refactor the mergeable property(which was incorrectly set and lead me this
bug) to be more maintainable.
- Add a dedicated test for conflicting checking, so it should prevent
future issues with this.

* Fix linter
2022-04-21 22:55:45 +01:00
Gusted
3ec1b6c223
Fix logging of Transfer API (#19456)
- Use the correct fullname's in tracing calls.
- Return correct function name in error.

Co-authored-by: 6543 <6543@obermui.de>
2022-04-22 00:05:53 +08:00
6543
c764355676
RepoAssignment ensure to close before overwrite (#19449)
* check if GitRepo already open and close if

* only run RepoAssignment once

* refactor context helper for api to open GitRepo
2022-04-21 17:17:57 +02:00
techknowlogick
225044e656
node12 is EOL (#19451)
* node12 is EOL

* fix lockfile
2022-04-20 21:17:39 -04:00
6543
725731cb6e
Add Changelog v1.16.6 (#19339) (#19450)
* Add Changelog v1.16.6 (#19339)

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>

* bump version

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-04-20 21:17:23 -04:00
Gusted
f4c1aa75be
Fix DELETE request for non-existent public key (#19443)
- Add a return for the first "block" of errors, which fixes the double
error messages.
- Add a return for `externallyManaged`.
- Resolves #19398
2022-04-21 03:08:30 +02:00
GiteaBot
f7a8e5c8f2 [skip ci] Updated translations via Crowdin 2022-04-21 00:10:26 +00:00
Gusted
23d37673bd
Don't panic on ErrEmailInvalid (#19441)
- Don't panic on `ErrEmailInvalid`, this was caused due that we were
trying to force `ErrEmailCharIsNotSupported` interface, which panics.
- Resolves #19397
2022-04-20 23:39:30 +02:00
zeripath
1e319ba41a
When dumping trim the standard suffices instead of a random suffix (#19440)
* When dumping trim the standard suffices instead of a random suffix

Instead of using the `path.Ext()` to trim the last "extension" suffix, just iterate
through the supported suffices and trim those.

Fix #19424

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

* fix enum with to have correct supported types only

Co-authored-by: 6543 <6543@obermui.de>
2022-04-20 20:53:34 +02:00
zeripath
a7f0ce6207
Add uploadpack.allowAnySHA1InWant to allow --filter=blob:none with older git clients (#19430)
Older git clients need uploadpack.allowAnySHA1InWant if partial cloning is allowed.

Fix #19118

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-04-20 17:52:16 +02:00
Gusted
5e68fe7d37
Don't allow merging PR's which are being conflict checked (#19357)
* Don't allow merging PR's which are being conflict checked

- When a PR is still being conflict checked, don't allow the PR to be
merged(the merge button could already be visible before e.g. a new
commit was pushed to the PR).
- Relevant(should prevent such issue from happening) #19352

Co-authored-by: delvh <dev.lh@web.de>
2022-04-20 16:43:15 +02:00
Campbell He
f2229e0566
doc: add brief intro on using traefik as reverse-proxy (#19432) 2022-04-20 16:08:23 +02:00
qwerty287
ae6a52440a
Fix panic in team repos API (#19431)
* Fix panic in team repos API

* Fix pagination

* fmt
2022-04-20 18:43:26 +08:00
zeripath
409ff55a29
When updating mirror repo intervals by API reschedule next update too (#19429)
When a mirror repo interval is updated by the UI it is rescheduled with that interval
however the API does not do this. The API also lacks the enable_prune option.

This PR adds this functionality in to the API Edit Repo endpoint.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-04-20 09:20:53 +01:00