소스 검색

Fix never matching clause

`length/1` is only used with lists.
feature/compile_get
rinpatch 4 년 전
부모
커밋
a21340caa1
3개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -0
      lib/pleroma/clippy.ex
  2. +1
    -0
      lib/pleroma/html.ex
  3. +1
    -1
      lib/pleroma/web/activity_pub/transmogrifier.ex

+ 1
- 0
lib/pleroma/clippy.ex 파일 보기

@@ -4,6 +4,7 @@

defmodule Pleroma.Clippy do
@moduledoc false

# No software is complete until they have a Clippy implementation.
# A ballmer peak _may_ be required to change this module.



+ 1
- 0
lib/pleroma/html.ex 파일 보기

@@ -163,6 +163,7 @@ defmodule Pleroma.HTML.Scrubber.Default do

require FastSanitize.Sanitizer.Meta
alias FastSanitize.Sanitizer.Meta

# credo:disable-for-previous-line
# No idea how to fix this one…



+ 1
- 1
lib/pleroma/web/activity_pub/transmogrifier.ex 파일 보기

@@ -387,7 +387,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
def handle_incoming(%{"id" => nil}, _options), do: :error
def handle_incoming(%{"id" => ""}, _options), do: :error
# length of https:// = 8, should validate better, but good enough for now.
def handle_incoming(%{"id" => id}, _options) when not (is_binary(id) and length(id) > 8),
def handle_incoming(%{"id" => id}, _options) when is_binary(id) and byte_size(id) < 8,
do: :error

# TODO: validate those with a Ecto scheme


불러오는 중...
취소
저장