-3

i have been banging my head against a wall, in trying to resolve this issue. When i try and type in the british pound sign as part of a password, when the password is sent, the user received the password with a ? instead of a £....

<asp:RegularExpressionValidator 
     ID="RegularExpressionValidator1" 
     ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,15}$"
     ErrorMessage="Passwords must be 8 characters min, must contain digits, special characters and upper and lower characters" 
     Display="Dynamic" 
     ControlToValidate="tbPass" 
     runat="server" 
     ForeColor="red">
</asp:RegularExpressionValidator>

So, i want a password to send with the pound sign included if this has been requested...

i tryed using &pound and also tryed typing in 163 above.. but the password is still missing the £ and replaced by the ?.. I understand this is encoding or something, but i cant figure out how to change this.

Presto
  • 888
  • 12
  • 30
  • Something is using ASCII instead of UTF8 somewhere, I imagine. – Matthew Watson Jan 16 '19 at 10:06
  • Psst - [Authentication Guidance for the Modern Era](https://www.troyhunt.com/passwords-evolved-authentication-guidance-for-the-modern-era/) by Troy Hunt. Note that it's based on recommendations coming out of UK/US security organisations. Lots of great guidance there (and I realise that you may not be in a position to push back on this requirement) - "*Verifiers SHOULD NOT impose other composition rules (e.g., requiring mixtures of different character types or prohibiting consecutively repeated characters) for memorized secrets*" – Damien_The_Unbeliever Jan 16 '19 at 10:43

1 Answers1

0

I assume that your passwords are stored in a string other than UTF-8 encoding. How to change the encoding you can see here: How can I transform string to UTF-8 in C#?

Cyber User
  • 863
  • 1
  • 7
  • 13