• waigl@lemmy.world
    link
    fedilink
    arrow-up
    49
    ·
    6 hours ago

    Any further “helpful” information in that error message would be a security issue.

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      3
      ·
      5 hours ago

      I am annoyed by (but respect) APIs that take it a level further and don’t even give you a 403 to say you’re unauthorised, they just give you a 404 because anything else would acknowledge that the resource you requested actually existed

      • Pika@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        3 hours ago

        I don’t respect them because most instances a 403 is more than adequate for your security. The only time I agree with having a 404 over a 403 would be file-specific pathing, but realistically the entire file directory should be a 403 instead of a 404, And then if the user is authorized to access the resource(but it isn’t there), then it gives a 404.

      • wheezy@lemmy.ml
        link
        fedilink
        English
        arrow-up
        9
        ·
        4 hours ago

        Wouldn’t unauthorized only be meant for AFTER a login is successful?

        Like, the user should have to have an active session first. Maybe you’re just talking about that case though.

        • smeg@feddit.uk
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 hours ago

          Maybe I meant unauthenticated. What is this, mandatory cybersecurity education!?