Skip to content

Commit

Permalink
Force Steam auth id to secure always (OpenUserJS#1352)
Browse files Browse the repository at this point in the history
* This was "our bug" and probably should have been anticipated back in the begginning of OUJS with Steam
* This takes care of the wishy-washy replies I read on a possible reversion from secure to unsecure in their routines. We never utilize the plain text value stored in `aId` so it's not important to match site secure status

NOTE(S):
* There is a manual recovery path discovered for those who have access to the DB directly but working on offloading it to the users. Need sleep first then more testing.
* Still keeping steam auth read-only until the DB can be examined further and this issue recovery

Applies to OpenUserJS#1347

Auto-merge
  • Loading branch information
Martii authored Apr 22, 2018
1 parent e712f12 commit aa2eda3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/passportVerify.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ exports.verify = function (aId, aStrategy, aUsername, aLoggedIn, aDone) {
} else if (aStrategy === 'github') {
// We only keep plaintext ids for GH since that's all we need
digest = aId;
} else if (aStrategy === 'steam') {
// Having these forced secure ids would allow us to do things with the user's
// account and that is something we DO NOT want to do
shasum.update(String(aId).replace(/^http:/, 'https:'));
digest = shasum.digest('hex');
} else {
// Having these ids would allow us to do things with the user's
// account and that is something we DO NOT want to do
Expand Down

0 comments on commit aa2eda3

Please sign in to comment.