Skip to content
  • Categories
  • Recent
  • Tags
  • All Topics
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Caint logo. It's just text.
  1. Home
  2. Uncategorized
  3. @tesaguri I actually think checking Content-Type is a good solution.

@tesaguri I actually think checking Content-Type is a good solution.

Scheduled Pinned Locked Moved Uncategorized
2 Posts 2 Posters 2 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • silverpillS This user is from outside of this forum
    silverpillS This user is from outside of this forum
    silverpill
    wrote last edited by
    #1

    @tesaguri I actually think checking Content-Type is a good solution. Do you disagree with FEP's recommendations?

    https://codeberg.org/fediverse/fep/src/commit/ff51196ee2331807103f00a6ff85065b67aef79c/fep/fe34/fep-fe34.md#fetching-from-an-origin

    Servers MUST validate all objects received from clients. Any activity representing an action that actor is not authorized to perform MUST be rejected. Special attention needs to be paid to media uploads, because malicious actors might attempt to bypass the validation by uploading ActivityPub documents as media. As an additional protection in cases where an attacker was able to bypass the validation, consumers MUST verify that the response to a GET request contains the Content-Type header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" or application/activity+json media type (see GHSA-jhrq-qvrm-qr36 for more information).

    The blame is on the originating server. But we also have Content-Type verification as an additional protection.

    Emelia πŸ‘ΈπŸ»T 1 Reply Last reply
    1
    0
    • R ActivityRelay shared this topic
    • silverpillS silverpill

      @tesaguri I actually think checking Content-Type is a good solution. Do you disagree with FEP's recommendations?

      https://codeberg.org/fediverse/fep/src/commit/ff51196ee2331807103f00a6ff85065b67aef79c/fep/fe34/fep-fe34.md#fetching-from-an-origin

      Servers MUST validate all objects received from clients. Any activity representing an action that actor is not authorized to perform MUST be rejected. Special attention needs to be paid to media uploads, because malicious actors might attempt to bypass the validation by uploading ActivityPub documents as media. As an additional protection in cases where an attacker was able to bypass the validation, consumers MUST verify that the response to a GET request contains the Content-Type header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" or application/activity+json media type (see GHSA-jhrq-qvrm-qr36 for more information).

      The blame is on the originating server. But we also have Content-Type verification as an additional protection.

      Emelia πŸ‘ΈπŸ»T This user is from outside of this forum
      Emelia πŸ‘ΈπŸ»T This user is from outside of this forum
      Emelia πŸ‘ΈπŸ»
      wrote last edited by
      #2

      @silverpill @tesaguri I think you already had guidance that it is best practice to serve user generated content (i.e., files uploaded by users) on a non-activitypub enabled domain?

      e.g., media.domain.example when domain.example is the AP server, as to prevent against these attacks?

      1 Reply Last reply
      1
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • All Topics
      • Popular
      • World
      • Users
      • Groups