xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

KeyStore password defaults to System.Char[] #320

Closed fekberg closed 5 years ago

fekberg commented 6 years ago

Xamarin.Auth Issue

The hardcoded password isn't used with the default constructor.

When you do ToString() on a char-array, it gives you the text System.Char[].

image

You'd have to do new string(PasswordHardCoded), or string.Join, however, this will break backwards compatibility and it should migrate to the default password (if that option should still exist)

newky2k commented 6 years ago

@fekberg The issue with the Tostring() appears to be a mono issue, rather than a Xamarin.Auth issue.

I've assigned @moljac to look into it for you

fekberg commented 6 years ago

@newky2k No, doing ToString on a char[] is incorrect.

See here as well: https://stackoverflow.com/questions/1324009/net-c-sharp-convert-char-to-string

Try it out using either mono or roslyn. Should definitely return "System.Char[]" as a string and not the actual content.

fekberg commented 5 years ago

@newky2k Any update?

newky2k commented 5 years ago

@fekberg I have assigned this issue to @moljac for him to investigate

Redth commented 5 years ago

We're working on a fix for this and should have it ready very soon.

newky2k commented 5 years ago

@fekberg I'm looking into this now, It appears that Xamarin.Auth was changed to use new string(PasswordHardCoded) in this commit -> https://github.com/xamarin/Xamarin.Auth/commit/f529702f8ba66712d4842dc19e614c6f5be8f260#diff-a69956567d5f7649f40fae8df21be687R53

I'm looking into the migration from the 'System.Char[]' to the content of PasswordHardCoded instead now.

Thank you for your patience

newky2k commented 5 years ago

Xamarin.Auth 1.6.0.3 has now been published to Nuget