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

Authenticate that User is Actually User #55

Closed
Harmonickey opened this issue Aug 4, 2015 · 1 comment
Closed

Authenticate that User is Actually User #55

Harmonickey opened this issue Aug 4, 2015 · 1 comment

Comments

@Harmonickey
Copy link
Owner

(BRANCH): bmw/28

(DESCRIPTION): Right now the user logs in and the $_SESSION tenant/landlord and userId variables are set. The only way to get to our API is to have tenant or landlord session variable set. It does not require that userId is set. UserId is currently exposed on the frontend by echoing to a javascript variable. In the worst case, someone wouldn't need to know the username and password of someone, but just go to their computer and see the userId in the javascript source. They could then login as their own user and insert the userId of another user into the ajax request.

There needs to be an auth script that checks to make sure that the information (userId probably) matches with the session variable (tenant or landlord). It would return a truthy value which I could use to execute or not execute the api script. This would prevent deletion of listings and accounts.

What might be better is to use UserId in the php only and never expose in the javascript. I may be able to do this, I don't remember why I took it out in the first place.

(ACCEPTANCE CRITERIA):

  1. No security leaks with api. No User can modify any other user's data.
  2. Full login on all 'sites' that can be accessed(like tenant and such)

(PARENT TICKET): #28

(DEPENDENT TICKETS):none

@Saurutobi Saurutobi assigned Harmonickey and unassigned Saurutobi Aug 17, 2015
@Saurutobi
Copy link
Collaborator

I'm handing this one to you for QA, not sure how to test this.

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

No branches or pull requests

2 participants