ServiceStack / Issues

Issue Tracker for the commercial versions of ServiceStack
11 stars 8 forks source link

OpenApi showing petstore when additional slashes used in url #762

Closed bdocrex closed 3 years ago

bdocrex commented 3 years ago

When using the OpenApiFeature up to and including ServiceStack.Api.OpenApi v5.12, placing additional slashes before swagger-ui in the url will reveal the petstore demo page.

For example http://mydomain.com//swagger-ui http://mydomain.com/////swagger-ui

This can be reproduced using the selfhost sample https://github.com/NetCoreTemplates/selfhost.git Using a url that is not "localhost" and the following line added to the AppHost.Configure method: Plugins.Add(new OpenApiFeature());

mythz commented 3 years ago

This should now be resolved from this commit.

This change is available from v5.12.1 that's now available on MyGet.

thx for reporting 👍