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

proj. danebook #32

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

asackofwheat
Copy link

No description provided.

end

def destroy
@user = User.find(params[:user_id])
Copy link

@alexglach alexglach Aug 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the user has to be in here, since you don't user the user.

end
end

def destroy
Copy link

@alexglach alexglach Aug 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by not using current user in this, I think you leave yourself open to someone being to change the params within the element and then delete posts that are not theirs. I'll check it out in the live app and let you know.

Update: Yes, I can delete posts that are not mine, by going to the delete link in the post that is mine and changing the href.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants