summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-02-15Merge branch 'bugfix-ccworks' into 'develop'Haelwenn
Bugfix for ccworks AP bridge Closes #3234 See merge request pleroma/pleroma!4043
2024-02-14Merge branch 'atom-leaks' into 'develop'feld
Fix minor atom leaks See merge request pleroma/pleroma!4065
2024-02-14Fix atom leak in background workerMark Felder
The only permitted values are "blocks_import", "follow_import", "mutes_import" of which we already have the equivalent atoms defined.
2024-02-14Fix atom leak in password digest functionalityMark Felder
The value here gets passesd to :crypto.pbkdf2_hmac and it expects one of these atoms: :sha | :sha224 | :sha256 | :sha384 | :sha512 so it will always exist
2024-02-14Websocket refactor to use Phoenix.Socket.TransportMark Felder
This will make us compatible with Cowboy and Bandit
2024-02-14Merge branch 'gun-logs' into 'develop'feld
Gun connection pool logs See merge request pleroma/pleroma!4063
2024-02-14Change some Gun connection pool logs to debug levelMark Felder
2024-02-14MediaProxy RFC complianceMark Felder
2024-02-14Config: Check the permissions of the linked file instead of the symlink↵Haelwenn (lanodan) Monnier
2024-02-12Fix notifications indexAlex Gleason
2024-02-09Fix Gun connection supervisor logic errorMark Felder
This was recently changed to solve a Dialyzer error, but the replacement logic was faulty as "retry" would only be compared to :error and not have its truthiness evaluated. The original logic was also faulty as it returned {:error, :pool_full} even retry was true. It never retried when the pool was full.
2024-02-09Use User.full_nickname/1 in oauth html templatemarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-06RichMedia.Helpers: move the validate_page_url/1 function to the Parser moduleMark Felder
This will ensure that the page validation happens in Parser.parse/1 so it can be called from anywhere and still filter invalid URLs.
2024-02-06Pleroma.Web.RichMedia.Parser: Remove test-specific codepathsMark Felder
Also consolidate Tesla mocks into the HttpRequestMock module. Tests were not exercising the real codepaths. The Rich Media Preview only works with https, but most of these tests were only mocking http.
2024-02-05Ensure URLs with IP addresses for the host do not generate previewsMark Felder
2024-02-04URI.authority is deprecatedMark Felder
2024-02-04Fix Rich Media Previews for updated activitiesMark Felder
The Rich Media Previews were not regenerated when a post was updated due to a cache invalidation issue. They are now cached by the activity id so they can be evicted with the other activity cache objects in the :scrubber_cache.
2024-02-02Pleroma.Filter: fix gradient errorMark Felder
lib/pleroma/filter.ex: The clause on line 220 cannot be reached
2024-02-02Pleroma.Config.DeprecationWarnings: fix gradient errorsMark Felder
lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 292 is expected to have type :ok | nil but it has type :error lib/pleroma/config/deprecation_warnings.ex: The function call move_namespace_and_warn( [ {Pleroma.ActivityExpiration, Pleroma.Workers.PurgeExpiredActivity, " * `config :pleroma, Pleroma.ActivityExpiration` is now `config :pleroma, Pleroma.Workers.PurgeExpiredActivity`"} ], warning_preface ) on line 350 is expected to have type :ok | nil but it has type :ok | nil | :error lib/pleroma/config/deprecation_warnings.ex: The function call move_namespace_and_warn( [ {Pleroma.Plugs.RemoteIp, Pleroma.Web.Plugs.RemoteIp, " * `config :pleroma, Pleroma.Plugs.RemoteIp` is now `config :pleroma, Pleroma.Web.Plugs.RemoteIp`"} ], warning_preface ) on line 366 is expected to have type :ok | nil but it has type :ok | nil | :error lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 390 is expected to have type :ok | nil but it has type :error lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 413 is expected to have type :ok | nil but it has type :error
2024-02-02Pleroma.Emoji.Pack: fix gradient errorMark Felder
lib/pleroma/emoji/pack.ex: The tuple {:cwd, tmp_dir} on line 103 is expected to have type :cooked | :keep_old_files | :memory | :verbose | {:cwd, list(char())} | {:file_filter, (record(:zip_file) -> boolean())} | {:file_list, list(:file.name())} but it has type {:cwd, binary()}
2024-02-02Pleroma Emoji mix task: fix gradient errorMark Felder
lib/mix/tasks/pleroma/emoji.ex: The tuple {:cwd, pack_path} on line 114 is expected to have type :cooked | :keep_old_files | :memory | :verbose | {:cwd, list(char())} | {:file_filter, (record(:zip_file) -> boolean())} | {:file_list, list(:file.name())} but it has type {:cwd, binary()}
2024-02-02Pleroma.HTTP.RequestBuilder: fix gradient errorMark Felder
lib/pleroma/http/request_builder.ex: The variable key on line 69 is expected to have type String.t() but it has type atom()
2024-02-02Pleroma.MFA: fix gradient errorMark Felder
lib/pleroma/mfa.ex: The map %{error: msg} on line 80 is expected to have type {:ok, list(binary())} | {:error, String.t()} but it has type %{required(:error) => any()}
2024-02-02Pleroma.MFA.Totp.provisioning_uri/3: add @specMark Felder
2024-01-31Merge remote-tracking branch 'origin/develop' into status-notification-typemarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-31Pleroma.Config.DeprecationWarnings: fix type errors detected by gradientMark Felder
lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 278 is expected to have type :ok | nil but it has type :error lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 292 is expected to have type :ok | nil but it has type :error lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 390 is expected to have type :ok | nil but it has type :error lib/pleroma/config/deprecation_warnings.ex: The atom :error on line 413 is expected to have type :ok | nil but it has type :error
2024-01-31Fix dialyzer errors due to deprecated usage of put_layout/2Mark Felder
2024-01-31Pleroma.Web.Plugs.RateLimiter.Supervisor: dialyzer errorMark Felder
lib/pleroma/web/plugs/rate_limiter/supervisor.ex:12:no_return Function init/1 has no local return.
2024-01-31Pleroma.Web.OAuth.OAuthController: dialyzer errorMark Felder
validate_scopes/2 can never receive a map as it is only called in one place with a guard requiring a list lib/pleroma/web/o_auth/o_auth_controller.ex:615:guard_fail The guard test: is_map(_params :: maybe_improper_list()) can never succeed.
2024-01-31Pleroma.Web.PleromaAPI.MascotController: fix dialyzer error due to bad error ↵Mark Felder
match lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:37:pattern_match The pattern can never match the type. Pattern: {:content_type, _} Type: {:error, _} ________________________________________________________________________________ lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:40:pattern_match The pattern can never match the type. Pattern: {:upload, {:error, _}} Type: {:error, _}
2024-01-31Pleroma.Web.MastodonAPI.SearchController: fix dialyzer errorsMark Felder
Add a separate Pagination.paginate_list/2 function instead of overloading paginate/4 and complicating its matching and @spec
2024-01-31Pleroma.Web.ControllerHelper: fix @spec to resolve dialyzer errorsMark Felder
lib/pleroma/web/admin_api/controllers/user_controller.ex:333:no_return Function index/2 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:357:unused_fun Function maybe_parse_filters/1 will never be called. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:366:no_return Function page_params/1 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:368:call The function call will not succeed. Pleroma.Web.ControllerHelper.fetch_integer_param(_params :: any(), :page, 1) breaks the contract (map(), String.t(), integer() | nil) :: integer() | nil
2024-01-31Pleroma.Web.TwitterAPI.UtilController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.MastodonAPI.StatusController: fix dialzyer errors with ↵Mark Felder
replace_params: false
2024-01-31MascotController dialyzer errorMark Felder
lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:31:call The function call will not succeed. Pleroma.Web.ActivityPub.ActivityPub.upload(_file :: atom() | %{:content_type => _, _ => _}, [{:actor, <<_::56, _::size(8)>>}, ...]) :: :ok def a() do :ok end will never return since the 2nd arguments differ from the success typing arguments: (any(), [ {:activity_type | :description | :filters | :size_limit | :type | :uploader, atom() | binary() | [atom()] | non_neg_integer()} ])
2024-01-31Pleroma.Web.PleromaAPI.UserImportController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.NotificationController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.MascotController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.EmojiPackController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.EmojiFileController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.ChatController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.SearchController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.ScheduledActivityController: fix dialyzer errors ↵Mark Felder
with replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.PollController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.NotificationController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.MediaController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.ListController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.FollowRequestController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.UserController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.ReportController: fix dialyzer errors with ↵Mark Felder
replace_params: false