Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Votes summary for deleted posts is shown to users without the privilege to see deleted posts #1514

Open
Oaphi opened this issue Jan 13, 2025 · 5 comments
Assignees
Labels
complexity: average Not particularly hard, not particularly trivial. priority: high type: bug Something isn't working

Comments

@Oaphi
Copy link
Member

Oaphi commented Jan 13, 2025

Daily vote summary shows votes for all posts without any check whether the user has access to those posts (either to category or deleted state). While we do not show the posts, this has potential to leak information that should not be public.

To Reproduce

Easily reproducible in production.

Expected behavior

Votes for deleted posts or inaccessible categories are filtered out from the view.

Screenshots

Screenshot from 2025-01-13 12-09-14

@Oaphi Oaphi added type: bug Something isn't working priority: high complexity: average Not particularly hard, not particularly trivial. labels Jan 13, 2025
@Oaphi Oaphi self-assigned this Jan 13, 2025
@cellio
Copy link
Member

cellio commented Jan 13, 2025

There's logic for the posts page (and main profile page) to filter out deleted posts, so presumably we can use that same logic here, though we'll need to handle the daily aggregation (adjust the number if a day has both live and deleted posts, omit the day if there's nothing to see).

Question: should mods and the owner see those entries on the votes summary, as for the posts page? If it complicates things too much then "no" is a fine answer, but if it's easy, we might want to do it for consistency. No strong opinion here, just raising the question.

@Oaphi
Copy link
Member Author

Oaphi commented Jan 14, 2025

Question: should mods and the owner see those entries on the votes summary, as for the posts page?

I believe they should - it's not too much work, and I was planning to do so from the beginning, it's just a matter of filtering depending on whether the user has permission - we already do that for search.

@trichoplax
Copy link
Contributor

Alternative suggestion:

  • Always include votes on deleted posts in the daily total.
  • For each post, show the votes received (whether deleted or not).
  • For each post, show either the title as a link or "Deleted post" or "Hidden post" (not a link) if the viewing user does not have access to see it.
  • For each post, show the post type (whether deleted or not).
  • For each post, show the category only if the viewing user has access to see that category.

Does this cover all of the concerns about leaking information?

This would still leak some information. Are the following acceptable:

  • A user will be able to tell that there are hidden categories, but not what they are called or how many, and will no longer have a link to them.
  • A user will be able to tell that there are deleted (or hidden) posts, and will have a lower bound on how many exist if several of the posts receive votes during the same day (if there are 4 deleted posts and 2 of them receive votes in the same day, I now know that there are at least 2 deleted posts).

@cellio if this way is acceptable, it would automatically mean that mods and the post author would see entries consistent with the posts page.

@trichoplax
Copy link
Contributor

trichoplax commented Jan 14, 2025

In thinking about this I found that reputation is affected by the deletion of a post (which I had not realised previously).

When a post is deleted, the reputation effects of all its upvotes and downvotes are reverted. Currently this does not appear to be reflected in the Vote Summary page. That is, the reputation is reverted but the votes still show on the Vote Summary page. Is this correct? If not it could be a separate issue, but I wanted to ask here in case it affects the approach to this issue.

Thinking of consistency, there's also the stats panel below the large user avatar on the right hand side of the user profile page. Here "Number of received votes (up minus down)" does not change when a post is deleted, but "Reputation" does. Not necessarily incorrect, just another thing that may need to match if any changes are made to how the Vote Summary page counts votes.

@cellio
Copy link
Member

cellio commented Jan 14, 2025

I don't think the existence of restricted categories needs to be a secret. It's ok if people see that those exist so long as they can't view them, IMO. "Can't view" would also mean not exposing the post titles. (Imagine an academic setting where faculty/TAs are using a restricted category to track issues with specific students -- you wouldn't want to leak a post title like "plagiarism investigation: Joe Blow".) I think this is what you mean by showing "hidden post", which sounds fine.

Do we care about potentially shaming users who got a bad start but recovered quickly? As a user, how would you feel about people seeing that you had 3 deleted posts yesterday with a total of 11 downvotes, but you've since gotten your footing and you have a couple live 0-vote posts? Would publicizing the history be prejudicial? Embarrassing? Or no big deal? (This might be a question for Meta.)

Thanks for the reminder about the stats panel. For consistency, it seems like the counts should be for undeleted posts; those who can see will see the true numbers elsewhere on the profile, and those who can't see don't need to be left wondering. But also, that stats panel needs work anyway, as it doesn't account for all post types, so it's ok with me if we defer that part if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: average Not particularly hard, not particularly trivial. priority: high type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants