Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Fixes issue #2334 Pass an encoded hex email to DEL /emails #2336

Closed
wants to merge 3 commits into from

Conversation

deeptibaghel
Copy link
Contributor

Fixes issue #2334 Pass an encoded hex email to DEL /emails

@ghost ghost assigned deeptibaghel Mar 10, 2018
@ghost ghost added the waffle:active label Mar 10, 2018
@deeptibaghel
Copy link
Contributor Author

r? @vbudhram

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@deeptibaghel This LGTM, you just have to run npm shrink to get the latest version of mozilla/fxa-auth-db-mysql@cc6e08b. This will get all the tests passing.

lib/db.js Outdated
@@ -431,7 +431,7 @@ module.exports = (

DB.prototype.setPrimaryEmail = function (uid, email) {
log.trace({op: 'DB.accountFromEmail', email: email})
return this.pool.post('/email/' + Buffer(email, 'utf8').toString('hex') + '/account/' + uid)
return this.pool.post('/email/' + Buffer.from(email, 'utf8').toString('hex') + '/account/' + uid)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should be able to use hexEncode helper here.

@vladikoff
Copy link
Contributor

@deeptibaghel , hey, make sure to change this SHA in here https://github.com/mozilla/fxa-auth-server/blob/master/npm-shrinkwrap.json#L343 to cc6e08b7d6aba6b15d06f34ee5efe0c15bc1d72b (that is your latest commit SHA from https://github.com/mozilla/fxa-auth-db-mysql/commits/master )

then tests should pass

@deeptibaghel
Copy link
Contributor Author

@vladikoff , i changed it but then the tests keep waiting forever :( , also the npm-shrinkwrap.json files shows as conflict , which is not clear to me.

@vladikoff
Copy link
Contributor

@vladikoff , i changed it but then the tests keep waiting forever :( , also the npm-shrinkwrap.json files shows as conflict , which is not clear to me.

Might have to git rebase against master. but first try to run npm run shrinkwrap and commit that, see if there is a conflict that way

@deeptibaghel deeptibaghel deleted the del-hex branch March 12, 2018 05:35
@ghost ghost removed the waffle:active label Mar 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants