This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 973
Updated recovery key parsing code to not rely on OS specific line endings #12717
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NejcZdovc
reviewed
Jan 19, 2018
app/browser/api/ledger.js
Outdated
@@ -266,9 +266,9 @@ const loadKeysFromBackupFile = (state, filePath) => { | |||
try { | |||
const recoveryFileContents = data.toString() | |||
|
|||
let messageLines = recoveryFileContents.split(os.EOL) | |||
let messageLines = recoveryFileContents.toString().match(/^.+$/gm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need another toString? we are doing it on the line 267
…ings Fixes #12716 Auditors: @kjozwiak, @NejcZdovc Test Plan: `npm run unittest -- --grep="loadKeysFromBackupFile"`
Codecov Report
@@ Coverage Diff @@
## master #12717 +/- ##
==========================================
+ Coverage 56.09% 56.12% +0.02%
==========================================
Files 279 279
Lines 27245 27245
Branches 4430 4430
==========================================
+ Hits 15282 15290 +8
+ Misses 11963 11955 -8
|
NejcZdovc
approved these changes
Jan 19, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ looks good
Did the following test:
- clean profile
- save recovery file
- change EOL to windows style
- clean profile
- import windows style file
NejcZdovc
added a commit
that referenced
this pull request
Jan 19, 2018
Updated recovery key parsing code to not rely on OS specific line endings
NejcZdovc
added a commit
that referenced
this pull request
Jan 19, 2018
Updated recovery key parsing code to not rely on OS specific line endings
NejcZdovc
added a commit
that referenced
this pull request
Jan 19, 2018
Updated recovery key parsing code to not rely on OS specific line endings
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12716
Auditors: @kjozwiak, @NejcZdovc
Submitter Checklist:
git rebase -i
to squash commits (if needed).Automated Test Plan:
npm run unittest -- --grep="loadKeysFromBackupFile"
Test plan
See #12716
Reviewer Checklist:
Tests