Skip to content

proj. danebook#32

Open
asackofwheat wants to merge 15 commits into
vikingeducation:masterfrom
asackofwheat:master
Open

proj. danebook#32
asackofwheat wants to merge 15 commits into
vikingeducation:masterfrom
asackofwheat:master

Conversation

@asackofwheat

Copy link
Copy Markdown

No description provided.

Comment thread app/controllers/likes_controller.rb Outdated
end

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

@alexglach alexglach Aug 12, 2016

Copy link
Copy Markdown

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

@alexglach alexglach Aug 22, 2016

Copy link
Copy Markdown

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.

2 participants