Elektrine lite

← Feed

@smeg@feddit.uk

2026-04-10 13:58 UTC

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

Replies (2)

  • @Pika@sh.itjust.works 2026-04-10 15:59

    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.

    Open ##1194557

  • @wheezy@lemmy.ml 2026-04-10 15:36

    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.

    Open ##1194558