EasyNetQ.Management.Client icon indicating copy to clipboard operation
EasyNetQ.Management.Client copied to clipboard

sanitise source/destination names in DeleteBindingAsync

Open mijabr opened this issue 6 years ago • 9 comments

allow characters + # / : in queue/exchange names when deleting bindings

mijabr avatar Nov 19 '18 04:11 mijabr

Hello,

I have solved this issue with method UrlEncode of the System.Net

Name = WebUtility.UrlEncode (queue.Name);

In this way I correctly codify any special character, I have already used in my prod enviroment for sanitise it, befoure to call DeleteQueue

bebematley avatar Nov 19 '18 09:11 bebematley

WebUtility is present in .netstandard 1.5 and netfx 4.5.2 so I think would be great to use it and fix all possible characters.

what do you think @mijabr @zidad ?

micdenny avatar Nov 19 '18 09:11 micdenny

@micdenny for sure that seems like the best solution!

zidad avatar Nov 19 '18 09:11 zidad

WebUtility.UrlEncode(....);

@mijabr can you apply that method instead of all the replace?

micdenny avatar Nov 19 '18 10:11 micdenny

@mijabr can we do this for all the methods? so we cover all the management api

micdenny avatar Nov 19 '18 12:11 micdenny

I'm unable reproduce the original issue with the integration tests. I'll have to go back and dig deeper.

mijabr avatar Nov 20 '18 06:11 mijabr

I'm unable reproduce the original issue with the integration tests. I'll have to go back and dig deeper.

ok no pressure, take your time 😄 but I would like to spread this fix for all the methods so to close this something like forever, because this issue was fired different times in the past, so it's time to really fix this ;)

micdenny avatar Nov 20 '18 13:11 micdenny

maybe SanitiseName is already used everywhere? BTW just check that this fix has been spread whenever is needed, thanks 🙇

micdenny avatar Nov 20 '18 13:11 micdenny

@mijabr do you have time to implement this using WebUtility.UrlEncode(....); instead of SanitiseName(...)?

micdenny avatar Mar 16 '21 10:03 micdenny

Fixed in #171

Pliner avatar Dec 11 '22 23:12 Pliner