Page with variable in URL and "+" character

Hi,

I have a page that accepts a variable in the URL. Everything works as long as the variable does not have the + sign.

I tried the following urls:
https://myserver/sms/send/+33123456789
https://myserver/sms/send/%2B33123456789

Result : error 404…

Surprisingly, * sign works with this URL: https://myserver/sms/send/*33123456789

Here is my code :

New-UDPage -Url "/sms/send/:To" -Title "Envoyer un SMS" -AuthorizationPolicy "Send SMS" -Endpoint { 
param ($To) 

    .... CODE ....
}

I wanted to say, Surprisingly, * sign works with this URL: https://myserver/sms/send/%2A33123456789

Problem solved.

I am under IIS. Everything works, after modifying the web.config file and adding the following line :

<security>
  <requestFiltering allowDoubleEscaping="true"/>
</security>
1 Like