ConfigFile: password encryption does not work on specific machine con… #1347

Merged
merged 3 commits into from Jan 5, 2016

Conversation

Projects
None yet
2 participants
@haraldsteinlechner
Contributor

haraldsteinlechner commented Jan 5, 2016

This pull request solves issue #1346

Note that i did not change DataProtectionScopes for decryption. This is is the minimal change i know which works (i think decrpytion ignores this).
The docs do not say anything about this: e.g. https://msdn.microsoft.com/en-us/library/2fh8203k(v=vs.110).aspx

ConfigFile: password encryption does not work on specific machine con…
…figurations. This is the minimal fix to make password encryption work in our environment. seealso issue: #1346
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

mhm this doesn't work on travis!?

Member

forki commented Jan 5, 2016

mhm this doesn't work on travis!?

@haraldsteinlechner

This comment has been minimized.

Show comment
Hide comment
@haraldsteinlechner

haraldsteinlechner Jan 5, 2016

Contributor

ah ok. awesome. no solution works on all configurations. We could do a simple probing - handle exception and try in local machine mode if user mode fails. what you think?

Contributor

haraldsteinlechner commented Jan 5, 2016

ah ok. awesome. no solution works on all configurations. We could do a simple probing - handle exception and try in local machine mode if user mode fails. what you think?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

sounds good. whatever works to make it work for more people is fine

Member

forki commented Jan 5, 2016

sounds good. whatever works to make it work for more people is fine

ConfigFile: data protection fix for mono (probing first tries current…
… user encryption scope and local machine if attempt fails)
@haraldsteinlechner

This comment has been minimized.

Show comment
Hide comment
@haraldsteinlechner

haraldsteinlechner Jan 5, 2016

Contributor

works now

Contributor

haraldsteinlechner commented Jan 5, 2016

works now

src/Paket.Core/ConfigFile.fs
+ try
+ ProtectedData.Protect(Encoding.UTF8.GetBytes password, salt, DataProtectionScope.CurrentUser)
+ with | :? CryptographicException as e ->
+ traceWarnfn "could not protect password: %s\n for current user" e.Message

This comment has been minimized.

@forki

forki Jan 5, 2016

Member

i think a verbosefn might be enough here

@forki

forki Jan 5, 2016

Member

i think a verbosefn might be enough here

forki added a commit that referenced this pull request Jan 5, 2016

Merge pull request #1347 from haraldsteinlechner/master
ConfigFile: password encryption does not work on specific machine con…

@forki forki merged commit af7bb6f into fsprojects:master Jan 5, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

thanks a lot

Member

forki commented Jan 5, 2016

thanks a lot

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