Skip to content

404 for private items the user does not have access to #524

Open
evanp opened this Issue Apr 1, 2013 · 6 comments

3 participants

@evanp
E14N member
evanp commented Apr 1, 2013

I don't like this, but @maiki brought it up on #199 and I decided to give it its own issue.

@evanp
E14N member
evanp commented Apr 1, 2013

We have different HTTP status codes for a reason; using incorrect status codes is not a friendly way to interact with other servers.

I've marked this "nomerge"; I won't accept patches for it.

@maiki
maiki commented Apr 1, 2013

Sorry about not making that a new issue, I brought it up to address the private post URL issue.

Exits stage left.

@evanp
E14N member
evanp commented Apr 1, 2013

Man, I'm being pretty bitchy tonight. Don't know what's up with that.

I think if we have the titles for things in an URL, returning 404 isn't going to help. Like, if you get an URL like:

http://whitehouse.example/obama/2013/04/01/the-nuclear-launch-codes-are-4-8-15-16-23-42

...and then you try to get that URL and it returns a 404, I think the important information has already leaked. A 404 gives some deniability (no, that's not what the launch codes are!), but don't prevent the data from leaking in the first place.

My feeling on the matter.

@maiki
maiki commented Apr 1, 2013

I agree that HTTP codes should be kept in line with their meanings. I am replying here because I want to make sure I understand how a 404 works. In your example you have a URL, which is a regrettably named http://whitehouse.example/obama/2013/04/01/the-nuclear-launch-codes-are-4-8-15-16-23-42. The thing about the 404 is, it will return for each of these:

As well as any string a person could think of that doesn't happen to be a post they are allowed to view as public or authenticated. I thought that was the only way to not leak information, if going by HTTP 4xx codes. Is that not the case?

For what it's worth, I don't have a strong opinion on this, but it is one angle to solve a privacy issue. I think a sufficiently notated post (with a date, really) is all we need, but my idea makes people who are going to rely on private posts second class citizens that can't use titles in a useful way. When I think about that, I would opt to leave as much as possible off (ex. http://whitehouse.example/post/98as7) for private posts.

@marjoleink

see #199 for related dicussion on return codes (403/404/409)

@marjoleink

I've marked this "nomerge"; I won't accept patches for it.

What exactly does that mean? That you will be returning as 403 as that is the only semantically correct return code for private items?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.