Sorunome / mx-puppet-skype

16 stars 4 forks source link

Passwords with spaces #15

Closed tchapi closed 3 years ago

tchapi commented 3 years ago

Hello

Skype accounts with passwords with a regular space ( ) in it does not work. I think this is due to:

https://github.com/Sorunome/mx-puppet-skype/blob/0255283d5aebbc8340d9f1ed389e3d91960925fe/src/index.ts#L120

I have tested to put the password in quotes but to no avail (which is pretty logical I suppose)

Thanks a lot ! Best regards

tchapi commented 3 years ago

To fix that, maybe add an option to provide the credentials in base64 for instance ? Because having another delimiter would just break with passwords that contain this specific character anyway

Or support quoted credentials. But I think this is more convoluted and could lead to edge cases (I guess this functionality would be implemented with a little regex)

tchapi commented 3 years ago

Hi @Sorunome

Any hint on that ? I'm happy to make a PR if you're ok with the base64 idea

BR

Sorunome commented 3 years ago

base64 encoding that doesn't seem user-friendly.

As the password is the last parameter it could just join all last parameters with a space and/or you can use regex splitting to only split at the first space?

https://stackoverflow.com/questions/4607745/split-string-only-on-first-instance-of-specified-character

tchapi commented 3 years ago

You're right that it's not user-friendly. Are we sure that the login part cannot contain any whitespace character ? If this is the case, your solution if fine

Sorunome commented 3 years ago

absolutely no idea :/

tchapi commented 3 years ago

As per the actual Microsoft register process, it's likely that the login is either [a-zA-Z1-9], or an email, so that should be fine !

tchapi commented 3 years ago

Do you want me to make a PR for this ?

Sorunome commented 3 years ago

if you want to, it'd be great!

    1. 2021 19:54:00 tchap notifications@github.com:

Do you want me to make a PR for this ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[https://github.com/Sorunome/mx-puppet-skype/issues/15#issuecomment-768498587], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AASSEVHC4KW4YDWKXCI5VVTS4BOMNANCNFSM4WOG5RJQ]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAArSURBVHic7cEBDQAAAMKg909tDjegAAAAAAAAAAAAAAAAAAAAAAAAAAA+DFFIAAEctgHwAAAAAElFTkSuQmCC###24x24:true###][Sledovací obrázek][https://github.com/notifications/beacon/AASSEVHUTSUGNAGYQAZM5I3S4BOMNA5CNFSM4WOG5RJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFXHFXGY.gif]

tchapi commented 3 years ago

I'll let you review https://github.com/Sorunome/mx-puppet-skype/pull/16 and test it to see if it works well for you :)