summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2022-12-09[chore] make single pull request template (#1239)Libravatar tobi4
When you have multiple templates, they can only be selected by the API, so you can't just open a pull request via the web UI and have the template presented to you. This should fix that by having just one pull request template.
2022-12-09[bugfix] attach bookmarks module to api (#1238)Libravatar tobi1
2022-12-09[docs] Update `CONTRIBUTING.md`, add pull request templates (#1216)Libravatar tobi7
* [docs] Update contributing.md - Add Pull Request process and guidelines. - Add feature/bug issue process. - Rearrange some sections for clarity. - Add overview of package structure. * [docs] Add build from source links * [chore] add pull request templates These link to the new CONTRIBUTING.md document, and include a checklist to validate that contributors have read the guidelines. * [docs] Put existing stub CoC in separate doc * update web related stuff in CONTRIBUTING.md Co-authored-by: f0x <f0x@cthu.lu>
2022-12-09[bugfix] fix unordered favorites (#1236)Libravatar Christoph Voigt1
2022-12-09[feature] Allow users to create + delete bookbarks, and view bookmarked ↵Libravatar Matthew Phillips26
statuses (#1168) * Implement Bookmarks * Update based on review comments * Update swagger doc * Fix argument passing to status.Bookmark * Update changed test * Updates based on latest PR review
2022-12-08[chore] move caches to a separate State{} structure (#1078)Libravatar kim27
* move caches to a separate State{} structure Signed-off-by: kim <grufwub@gmail.com> * fix call to log.Panic not using formatted call Signed-off-by: kim <grufwub@gmail.com> * move caches to use interfaces, to make switchouts easier in future Signed-off-by: kim <grufwub@gmail.com> * fix rebase issue Signed-off-by: kim <grufwub@gmail.com> * improve code comment Signed-off-by: kim <grufwub@gmail.com> * fix further issues after rebase Signed-off-by: kim <grufwub@gmail.com> * heh Signed-off-by: kim <grufwub@gmail.com> * add missing license text Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-12-08[chore] Remove deprecated linters (#1228)Libravatar Mike Perham1
2022-12-07[docs] Update README.md (#1126)Libravatar Marie Axelsson1
added myself to the team, tyvm.
2022-12-07[docs] encourage using loopback bind address (#1166)Libravatar Andrea5
2022-12-06[feature] overhaul the oidc system (#961)Libravatar Dominik Süß20
* [feature] overhaul the oidc system this allows for more flexible username handling and prevents account takeover using old email addresses * [feature] add migration path for old OIDC users * [feature] nicer error reporting for users * [docs] document the new OIDC flow * [fix] return early on oidc error * [docs]: add comments on the finalization logic
2022-12-06[feature] media: add webp support (#1155)Libravatar Sigrid Solveig Haflínudóttir26
* media: add webp support Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> * bump exif-terminator to v0.5.0 Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
2022-12-05[docs] Remove filesystem logging directives from example systemd unit config ↵v0.6.0Libravatar f0x522
(#1206) * remove filesystem logging directives from example systemd unit config * [docs] Update docs to reflect new systemd config Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-12-05[bugfix]: Prevent extension of S3 presigned url TTL (#1208)Libravatar Dominik Süß1
Thanks :)
2022-12-04[chore] Fix a few possible cases of int truncation (#1207)Libravatar Daniele Sluijters9
This fixes a couple of cases where due to int being platform dependent a value could get truncated if running on 32bits.
2022-12-02[performance]: make s3 urls cacheable (#1194)v0.6.0-rc3Libravatar Dominik Süß3
Implements #864 and should speed up s3 based installations by a lot. With more static urls, we can then also implement #1026 for even better performance when used in conjunction with CDNs
2022-12-02[bugfix] Fix `admin account confirm` on pre-confirmed account setting email ↵Libravatar tobi2
address to empty string (#1203)
2022-12-02[bugfix] Add missing continues in emoji get funcs (#1200)Libravatar tobi1
2022-12-02[chore/frontend] remove domain block edit functionality until implemented in ↵Libravatar f0x521
backend (#1199)
2022-12-01[chore] Remove duplicate prefixes from sanitizer (#1195)Libravatar Daniele Sluijters1
In the previous changes that expanded the IPv4 and IPv6 deny lists based on the IANA registries we inadvertently added a number of duplicates. This is unnecessary as they're already caught by larger prefixes and means there's less entries to scan. This change removes all prefixes that are subnets of other prefixes.
2022-12-01[bugfix/frontend] fix profile grid scaling in webkit based browsers (#1193)Libravatar f0x521
2022-12-01[bugfix] Use case-insensitive selects when getting remote accounts by ↵v0.6.0-rc2Libravatar tobi2
username/domain (#1191) * [bugfix] Case-insensitive account selection * don't lowercase cache key
2022-11-30[feature] Support PKCS1 "RSA PUBLIC KEY" pem block type (#1179)Libravatar Sigrid Solveig Haflínudóttir1
* ap: add support for PKCS1 "RSA PUBLIC KEY" pem block type Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> * ap: report no PEM data or unknown pem block type Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
2022-11-30[docs] Add AppArmor profile for Debian and Ubuntu installations (#1183)Libravatar kernelmethod4
* Enable the 'admonitions' Markdown extension for Mkdocs. The admonitions extension to Python-Markdown allows you to include rST-style "admonitions" to Markdown documents, for instance, !!! note Here's an important note to keep in mind! In general, the current documentation uses bold text to try to achieve the same effect, which is a bit harder to notice and makes it difficult to differentiate between "here's something useful to know" versus "here there be dragons". * Add AppArmor profile and documentation for LSM-related sandboxing This commit adds an AppArmor profile for gotosocial in examples/apparmor/gotosocial. This will (hopefully) serve as a helpful security mitigation for people are planning on deploying GTS on a Debian-family Linux distribution. I've also updates the documentation to include some information about deploying GTS with either AppArmor or SELinux (moving the documentation for the former out of the "binary installation guide" docs).
2022-11-30[bugfix] Don't call `strings.ToLower()` on usernames when selecting account ↵Libravatar tobi9
by domain+username (#1190) * don't lowercase account username when doing a select * test getting remote user with uppercase username
2022-11-30[bugfix] use correct key for PATCHing admin email (#1189)Libravatar tobi1
2022-11-30[bugfix] Avoid accidentally marking changed emojis as orphaned + pruning ↵Libravatar tobi10
them (#1188) * add predictable instance account to tests, use it in emoji urls + paths * use static image url to select emojis when pruning orphaned
2022-11-30[bugfix] change page width to prevent scrollbar overflow (#1182)Libravatar f0x521
2022-11-29[bugfix] don't return error during account serialize on deleted emoji (#1177)Libravatar kim1
* only return error for emoji fetch if NOT errnoentries Signed-off-by: kim <grufwub@gmail.com> * reformat gts->api model slice conversion to standard error behaviours and reduce code reuse Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-29[bugfix] wrap the correct error on failed account update (#1176)Libravatar kim1
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-29[chore] Tidy up some of the search logic (#1082)v0.6.0-rc1Libravatar tobi23
* start refactoring some of the search + deref logic * add tests for search api * rename GetRemoteAccount + GetRemoteStatus * make search function a bit simpler + clearer * fix little fucky wucky uwu owo i'm just a little guy * update faulty switch statements * update test to use storage struct * redo switches for clarity * reduce repeated logic in search tests * fastfail getstatus by uri * debug log + trace log better * add implementation note * return early if no result for namestring search * return + check on dereferencing error types * errors hah what errors * remove unneeded error type alias, add custom error text during stringification itself * fix a woops recursion :see_no_evil: Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: kim <grufwub@gmail.com>
2022-11-28[chore] Bump database dependencies (#1164)Libravatar tobi529
github.com/uptrace/bun v1.1.8 -> v1.1.9 github.com/uptrace/bun/pgdialect v1.1.8 -> v1.1.9 github.com/uptrace/bun/sqlitedialect v1.1.8 -> v1.1.9 modernc.org/sqlite v1.18.2 -> v1.19.5
2022-11-28[chore]: Bump codeberg.org/gruf/go-store/v2 from 2.0.9 to 2.0.10 (#1160)Libravatar dependabot[bot]10
Bumps codeberg.org/gruf/go-store/v2 from 2.0.9 to 2.0.10. --- updated-dependencies: - dependency-name: codeberg.org/gruf/go-store/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-27fix missing lookup cache key for invalid domain block (#1158)Libravatar kim1
2022-11-27[bugfix] Use Host domain for UA (#1156)Libravatar Daniele Sluijters1
In d6f4d196c978d81041ea99a32e2d6f63b0639472 we swapped to use the AccountDomain but that actually goes against the intent of the change. This reverts that change and uses the host domain again.
2022-11-26[chore] Set User-Agent header in transport (#1154)Libravatar Daniele Sluijters6
Currently requests set their own User-Agent. This moves it down to set it in the transport's do() method, to guarantee it's always set on all requests.
2022-11-26Tweak the User-Agent a bit (#1153)Libravatar Daniele Sluijters1
* [bugfix] Use AccountDomain for user agent By using the account domain we can pinpoint the source of the request more accurately when looking at the User-Agent header. * [chore] Align user-agent header with spec Based on RFC 7231, our User-Agent header doesn't quite match. It seems to always want Name [/ Version] pairs, with comments in parenthesis and multiple comments separated by a semicolon. Align our UA with that, using application name first by itself in case someone has customised it with the source instance in a comment. Follow that up with gotosocial/<version> and a comment pointing at the source code. This also drops the mention of gofed/activity since a fork is in use.
2022-11-26Additional IP range validations (#1152)Libravatar Daniele Sluijters4
* [bugfix] Ensure requests happen over TCP It's possible for the network to be udp4 or udp6. This is rather unlikely to occur, but since we're given the network anyway as part of the Sanitize function getting called we might as well check for it. * [chore] Align reserved v6 blocks to IANA registry * [chore] Add test for ValidateIP The net and netip packages diverge in that net.ParseIP will consider an IPv4-mapped address to be an IPv4 address and as such it would get caught by the IPv4Reserved list. However, netip considers it an IPv6 address, so we need to ensure the mapped range is in IPv6Reserved. * [chore] Align reserved v4 blocks to IANA registry This includes a number of tests for /32's explicitly called out in the registry to ensure we always consider those invalid.
2022-11-25[bugfix]: Fix IPv6 validation (#1150)Libravatar Daniele Sluijters1
* [bugfix]: Fix IPv6 validation The current code considers ff00::/8 valid, but contrary to the comment that's not the global unicast range. ff-prefixes in IPv6 denote multicast. This adapts the code to take the same approach as IPv4, explicitly blacklisting reserved internal/private ranges. * [chore] Add missing 4 in IPv4Reserved doc comment
2022-11-25[docs] Explain that before 0.6.0, account confirm was necessary. (#1149)Libravatar Phil Hagelberg2
Since the documentation site only shows the latest version of the docs, we need the docs to explain how to use the latest stable release, not just the latest git version.
2022-11-25[feature] Add `admin media prune orphaned` CLI command (#1146)Libravatar tobi11
* add FilePath regex * add `admin media prune orphaned` command * add prune orphaned function to media manager * don't mark flag as required * document admin media prune orphaned cmd * oh envparsing.sh you coy minx
2022-11-25[bugfix] Change emailVerified to true for admin account create (#1140)Libravatar Phil Hagelberg4
The NewSignup method was already being called with requireApproval=false, but it had emailVerified=false as well, which meant that it was required to use the `admin account confirm` command to verify the email before the newly-created user could log in. I think that was probably an oversight; effectively it did require approval anyway. Changing emailVerified to true allows you to just create the account and log in immediately, reducing the opportunity for manual error to sneak in. Also updated the docs to remove the mention of needing to confirm new accounts. However, I've left the confirmation command alone because I think once we have web signups, it will be needed in that context.
2022-11-25[chore] Fix frogend admin emoji patch (#1148)Libravatar f0x523
* fix className * fix unable to set category on new emoji * wrap emoji groups
2022-11-25[feature/frogend] modify local emoji (#1143)Libravatar f0x5211
* update danger button red * emoji category and image modification * debug bundles in dev * fix linting error
2022-11-24[feature] `PATCH /api/v1/admin/custom_emojis/{id}` endpoint (#1061)Libravatar tobi10
* start adding admin emoji PATCH stuff * updating works OK, now how about copying * allow emojis to be copied * update swagger docs * update admin processer to use non-interface storage driver * remove shortcode updating for local emojis * go fmt Co-authored-by: f0x52 <f0x@cthu.lu>
2022-11-24[bugfix] Fix status boosts giving 404 (#1137)Libravatar tobi3
We broke this at some point recently, and i'm not sure when. In any case, i updated some of the logic in there + added a test for it.
2022-11-24[bugfix] Prevent future statuses entering timelines (#1134)Libravatar tobi5
* [bugfix] Prevent future statuses entering timeline Statuses created more than 5 minutes into the future are now rejected in the visibility package. * Come on buddy
2022-11-24[chore] cleanup storage implementation, no need for multiple interface types ↵Libravatar kim35
(#1131) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-23[feature/performance] Fail fast when doing remote transport calls inside ↵Libravatar tobi17
incoming request contexts (#1119) * [feature/performance] Fail fast when doing remote transport calls inside incoming request contexts * [chore] Reduce outgoing request timeout to 15s * log error messages when fastfailing * use context.Value() instead of wrapped context, wrap error with fastfail instead of extra log entry * add fast-fail context key test Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: kim <grufwub@gmail.com>
2022-11-23[docs] Clarify that reverse proxy setups need trusted-proxies (#1127)Libravatar dx5
* [docs] Clarify that reverse proxy setups need trusted-proxies * Remove the jq usage
2022-11-23[chore/frogend] fix profile preview css, use role info (#1130)Libravatar f0x525
* fix profile preview css, use role info * remove unused redux selector