OneIdentity / safeguard-ps

One Identity Safeguard PowerShell scripting resources
Apache License 2.0
22 stars 27 forks source link

Connect-Safeguard commandlet fails when using a £ sign - UTF8 encoding error #455

Closed PaulJex closed 1 year ago

PaulJex commented 1 year ago

I'm logging on to an SPP node with the v7.2.83376 of the safeguard-ps commandlets.

When the users login password contains a UK '£' sign (for example Password1£) the login fails:

Request Error The server encountered an error processing the request. The exception message is 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter RSts.Sts.OAuth2:password. The InnerException message was 'There was an error deserializing the object of type System.String. '�' contains invalid UTF8 bytes.'.

The PS command I'm using is: Connect-Safeguard -Insecure 10.x.x.x ad27 username -verbose

If I change the users password to swap the £ for a $ the login works fine.

I'm trying to use AD authentication. This is against SPP v7.1. Tried multiple SPP instances, same issue.

Attached is a print screen showing the error (albeit running from one of the provided Sample scripts).

For what its worth, I can login to the Web UI fine. Seems like an UTF8 encoding issue of some kind between PS and the RSTS I'd imagine.

Error
miroberts commented 1 year ago

Here is a build with this fix in it https://www.powershellgallery.com/packages/safeguard-ps/7.2.91330-pre

PaulJex commented 1 year ago

@miroberts - FYI, tested this against v7.2.91330 and all is working well. Thank you for fixing so quickly.