Skip to content

Commit

Permalink
Made votes anonymous.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Jul 29, 2019
1 parent 3720681 commit 4e732b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ app.get('/api/voteOnSponsorTime', function (req, res) {
}

//hash the userID
userID = getHashedUserID(userID);
userID = getHashedUserID(userID + UUID);

//x-forwarded-for if this server is behind a proxy
let ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
Expand Down

2 comments on commit 4e732b6

@NDevTK
Copy link
Contributor

@NDevTK NDevTK commented on 4e732b6 Jul 30, 2019

Choose a reason for hiding this comment

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

There not anonymous there in "privateDB"

@ajayyy
Copy link
Owner Author

@ajayyy ajayyy commented on 4e732b6 Jul 30, 2019

Choose a reason for hiding this comment

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

Yes, they are. Since the userID is hashed with the sponsorID as the salt, you can't tell which users have done which votes.

Please sign in to comment.