summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2023-08-11[feature] Set Content-Security-Policy header (#2095)Libravatar Daenney2
This adds the CSP header with a policy of only loading from the same domain. We don't make use of external media, CSS, JS, fonts, so we don't ever need external data loaded in our context. When building a DEBUG build, the policy gets extended to include localhost:*, i.e localhost on any port. This keeps the live-reloading flow for JS development working. localhost and 127.0.0.1 are considered to be the same so mixing and matching those doesn't result in a CSP violation.
2023-08-11[bugfix] Populate followReq before accessing targetaccount pointer (#2099)Libravatar tobi1
2023-08-10[bugfix] Use length in runes when trimming for RSS (#2094)Libravatar tobi2
2023-08-10[chore] Add test to ensure `show_reblogs` on follow works as expected (#2093)Libravatar tobi1
2023-08-10[performance] remove last of relational queries to instead rely on caches ↵Libravatar kim19
(#2091)
2023-08-09[feature] List replies policy, refactor async workers (#2087)Libravatar tobi49
* Add/update some DB functions. * move async workers into subprocessor * rename FromFederator -> FromFediAPI * update home timeline check to include check for current status first before moving to parent status * change streamMap to pointer to mollify linter * update followtoas func signature * fix merge * remove errant debug log * don't use separate errs.Combine() check to wrap errs * wrap parts of workers functionality in sub-structs * populate report using new db funcs * embed federator (tiny bit tidier) * flesh out error msg, add continue(!) * fix other error messages to be more specific * better, nicer * give parseURI util function a bit more util * missing headers * use pointers for subprocessors
2023-08-09[bugfix] Fix incorrect per-loop variable capture (#2092)Libravatar Daenney2
These should be per iteration, not per loop. This was caught by running a build with the loopvar experiment: go build -gcflags=-d=loopvar=2.
2023-08-09update coc (#2090)Libravatar kim2
* update coc * improve wording * point to coc doc in contributing doc * swap-out ancap for capitalist * fix git relative path * ACTUALLY fix the relative link * fix spelling of abhorrent
2023-08-09[docs] Add first anti-harassment research article re: authorized fetch (#2089)Libravatar tobi1
2023-08-08[bugfix] only set content-length AFTER rewinding body bytes (#2086)Libravatar kim1
2023-08-08[bugfix] don't accept unrelated statuses (#2078)Libravatar kim7
Co-authored-by: Daenney <daenney@users.noreply.github.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-08-08[chore] Update robots.txt, give chatgpt the middle finger (#2085)Libravatar tobi1
2023-08-08[chore] Add Feditext as recommended client (#2081)Libravatar Daenney8
With Feditext now accepting beta users, this adds it as the third client to recommend so we have web and the dominant mobile platforms covered. This also removes the screenshots from the README, because it became a mess trying to add a third one. Either the cells become very narrow, or the table doubles in height. As the UI may also change over time, it might be better to point folks at the apps instead who'll hopefully have up to date screenshots in their storefronts.
2023-08-07[chore] Use generic pointer function (#2080)Libravatar Daenney22
This replaces the different $TypePtr functions with a generic implementation.
2023-08-07[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.7 to 2.12.8 (#2073)Libravatar dependabot[bot]10
2023-08-07[feature] Allow full BCP 47 in language inputs (#2067)Libravatar Vyr Cossont9
* Allow full BCP 47 in language inputs Fixes #2066 * Fuse validation and normalization for languages * Remove outdated comment line * Move post language canonicalization test
2023-08-07[chore]: Bump golang.org/x/oauth2 from 0.10.0 to 0.11.0 (#2076)Libravatar dependabot[bot]6
2023-08-07[chore]: Bump github.com/abema/go-mp4 from 0.11.0 to 0.12.0 (#2075)Libravatar dependabot[bot]10
2023-08-07[chore]: Bump golang.org/x/crypto from 0.11.0 to 0.12.0 (#2077)Libravatar dependabot[bot]47
2023-08-07[chore]: Bump golang.org/x/image from 0.9.0 to 0.11.0 (#2074)Libravatar dependabot[bot]6
2023-08-06[chore] Remove go-playground/validator (#2069)Libravatar Daenney51
* [chore] Remove go-playground/validator It turns out we're not actually using the validator code. This is a remnant from when we intended to use it, but the presence of it and its struct tags creates the illusion we're validating a lot of things we're not. It resulted in some confusion when we were trying to figure out language valdiation. Remove all this code, so that only the validation functions from the validate package we actually use remain. I'm not touching the struct tags in the migrations in order to avoid things potentially thinking migrations need to be re-run. * [chore] Bring back a struct tag on api The validate on internal/api is Gin doing form validation, not the validator from go-playground/validator.
2023-08-06[bugfix] update cache library with nil ptr fix (#2070)Libravatar kim6
Signed-off-by: kim <grufwub@gmail.com>
2023-08-06[docs] fix postgres create database command (#2071)Libravatar Max Rosin1
The current command `create database gotosocial with locale C.UTF-8 template template0;` fails because the locale has to be quoted: ``` postgres=# create database gotosocial with locale C.UTF-8 template template0; ERROR: syntax error at or near "." LINE 1: create database gotosocial with locale C.UTF-8 template temp... ``` Tested manually that it works with the quotes and the official postgres examples also use quotes around the locales: https://www.postgresql.org/docs/current/sql-createdatabase.html
2023-08-04[performance] add caching of status fave, boost of, in reply to ID lists (#2060)Libravatar kim27
2023-08-03[feature] simpler cache size configuration (#2051)Libravatar kim32
* add automatic cache max size generation based on ratios of a singular fixed memory target Signed-off-by: kim <grufwub@gmail.com> * remove now-unused cache max-size config variables Signed-off-by: kim <grufwub@gmail.com> * slight ratio tweak Signed-off-by: kim <grufwub@gmail.com> * remove unused visibility config var Signed-off-by: kim <grufwub@gmail.com> * add secret little ratio config trick Signed-off-by: kim <grufwub@gmail.com> * fixed a word Signed-off-by: kim <grufwub@gmail.com> * update cache library to remove use of TTL in result caches + slice cache Signed-off-by: kim <grufwub@gmail.com> * update other cache usages to use correct interface Signed-off-by: kim <grufwub@gmail.com> * update example config to explain the cache memory target Signed-off-by: kim <grufwub@gmail.com> * update env parsing test with new config values Signed-off-by: kim <grufwub@gmail.com> * do some ratio twiddling Signed-off-by: kim <grufwub@gmail.com> * add missing header * update envparsing with latest defaults Signed-off-by: kim <grufwub@gmail.com> * update size calculations to take into account result cache, simple cache and extra map overheads Signed-off-by: kim <grufwub@gmail.com> * tweak the ratios some more Signed-off-by: kim <grufwub@gmail.com> * more nan rampaging Signed-off-by: kim <grufwub@gmail.com> * fix envparsing script Signed-off-by: kim <grufwub@gmail.com> * update cache library, add sweep function to keep caches trim Signed-off-by: kim <grufwub@gmail.com> * sweep caches once a minute Signed-off-by: kim <grufwub@gmail.com> * add a regular job to sweep caches and keep under 80% utilisation Signed-off-by: kim <grufwub@gmail.com> * remove dead code Signed-off-by: kim <grufwub@gmail.com> * add new size library used to libraries section of readme Signed-off-by: kim <grufwub@gmail.com> * add better explanations for the mem-ratio numbers Signed-off-by: kim <grufwub@gmail.com> * update go-cache Signed-off-by: kim <grufwub@gmail.com> * library version bump Signed-off-by: kim <grufwub@gmail.com> * update cache.result{} size model estimation Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-08-02[bugfix] Rework MultiError to wrap + unwrap errors properly (#2057)Libravatar tobi24
* rework multierror a bit * test multierror
2023-08-02[bugfix] fix slow accounts / statuses using emojis lookups (#2056)Libravatar kim3
* update DeleteEmoji to use faster relational tables for status / account finding Signed-off-by: kim <grufwub@gmail.com> * update Get{Accounts,Statuses}UsingEmoji() to also use relational tables Signed-off-by: kim <grufwub@gmail.com> * remove the now unneeded tags relation from newStatusQ() Signed-off-by: kim <grufwub@gmail.com> * fix table names Signed-off-by: kim <grufwub@gmail.com> * fix account and status selects using emojis Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-08-02[bugfix] handle HEAD requests more elegantly (#2055)Libravatar kim1
Signed-off-by: kim <grufwub@gmail.com>
2023-08-02[bugfix] Allow instance accounts to be shown in search results in certain ↵Libravatar tobi6
circumstances (#2053)
2023-08-01[feature] Allow users to skip http client tls verification for testing ↵Libravatar tobi10
purposes (with appropriately loud warnings) (#2052)
2023-08-01[feature] Set timezone in Docker using TZ env variable (#2050)Libravatar tobi4
2023-08-01Revert "[feature] Configurable timezone in containers (#2046)" (#2048)Libravatar tobi2
This reverts commit 96dd0e75f20a1f1f8203f3438ae7a82d260a0ef8.
2023-08-01[feature] Configurable timezone in containers (#2046)Libravatar Charles Chin2
2023-07-31[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)Libravatar tobi69
* update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability
2023-07-31[performance] cache follow, follow request and block ID lists (#2027)Libravatar kim29
2023-07-31[bugfix/frontend] Decode URI component domain before showing on frontend (#2043)Libravatar tobi1
2023-07-31[chore]: Bump github.com/abema/go-mp4 from ↵Libravatar dependabot[bot]3
0.10.2-0.20230727031202-a1a707db6ecd to 0.11.0 (#2042) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31[chore]: Bump github.com/minio/minio-go/v7 from 7.0.60 to 7.0.61 (#2041)Libravatar dependabot[bot]34
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-29[feature] Implement markers API (#1989)Libravatar Vyr Cossont29
* Implement markers API Fixes #1856 * Correct import grouping in markers files * Regenerate Swagger for markers API * Shorten names for readability * Cache markers for 6 hours * Update DB ref * Update envparsing.sh
2023-07-27[chore] Update activity dependency (#2031)Libravatar tobi405
2023-07-27[chore] fix merge issue (#2029)Libravatar tobi1
2023-07-27[chore] update go-mp4 to latest commit (#2028)Libravatar Dominik Süß4
This adds support for probing mp4 files with a co64 box instead of an stco box, which is the case for videos recorded on newer android devices.
2023-07-27[feature] Support setting private notes on accounts (#1982)Libravatar Vyr Cossont19
* Support setting private notes on accounts * Reformat comment whitespace * Add missing license headers * Use apiutil.ParseID * Rename Note model and cache to AccountNote * Update golden cache config in test/envparsing.sh * Rename gtsmodel/note.go to gtsmodel/accountnote.go * Update AccountNote uniqueness constraint name Now has same prefix as other indexes on this table. --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2023-07-25[performance] retry db queries on busy errors (#2025)Libravatar kim53
* catch SQLITE_BUSY errors, wrap bun.DB to use our own busy retrier, remove unnecessary db.Error type Signed-off-by: kim <grufwub@gmail.com> * remove dead code Signed-off-by: kim <grufwub@gmail.com> * remove more dead code, add missing error arguments Signed-off-by: kim <grufwub@gmail.com> * update sqlite to use maxOpenConns() Signed-off-by: kim <grufwub@gmail.com> * add uncommitted changes Signed-off-by: kim <grufwub@gmail.com> * use direct calls-through for the ConnIface to make sure we don't double query hook Signed-off-by: kim <grufwub@gmail.com> * expose underlying bun.DB better Signed-off-by: kim <grufwub@gmail.com> * retry on the correct busy error Signed-off-by: kim <grufwub@gmail.com> * use longer possible maxRetries for db retry-backoff Signed-off-by: kim <grufwub@gmail.com> * remove the note regarding max-open-conns only applying to postgres Signed-off-by: kim <grufwub@gmail.com> * improved code commenting Signed-off-by: kim <grufwub@gmail.com> * remove unnecessary infof call (just use info) Signed-off-by: kim <grufwub@gmail.com> * rename DBConn to WrappedDB to better follow sql package name conventions Signed-off-by: kim <grufwub@gmail.com> * update test error string checks Signed-off-by: kim <grufwub@gmail.com> * shush linter Signed-off-by: kim <grufwub@gmail.com> * update backoff logic to be more transparent Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-07-24[feature/performance] support uncaching remote emoji + scheduled cleanup ↵Libravatar kim33
functions (#1987)
2023-07-24[chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.24 to 1.0.25 (#2021)Libravatar dependabot[bot]6
2023-07-24[chore]: Bump github.com/yuin/goldmark from 1.5.4 to 1.5.5 (#2023)Libravatar dependabot[bot]7
2023-07-24[chore]: Bump codeberg.org/gruf/go-cache/v3 from 3.4.1 to 3.4.3 (#2022)Libravatar dependabot[bot]4
2023-07-24[chore]: Bump github.com/jackc/pgconn from 1.14.0 to 1.14.1 (#2024)Libravatar dependabot[bot]6
2023-07-24[chore]: Bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3 (#2020)Libravatar dependabot[bot]6