micronaut-projects / micronaut-core

Micronaut Application Framework
http://micronaut.io
Apache License 2.0
6k stars 1.04k forks source link

Endpoint with int pathvariable returns 403 even if security is not enabled #10680

Open abondar24 opened 3 months ago

abondar24 commented 3 months ago

Expected Behavior

Endpoint returns 200

Actual Behaviour

Getting 403 if int path param is below 10.

Steps To Reproduce

  1. Create an endpoint with @Get("/{limit}")
  2. Call it with value between 1 and 9
  3. you will get 403
  4. add swagger ui config like below

micronaut.router.static-resources.swagger.paths=classpath\:META-INF/swagger micronaut.router.static-resources.swagger-ui.mapping=/swagger-ui/ micronaut.router.static-resources.swagger-ui.paths=classpath\:META-INF/swagger/views/swagger-ui micronaut.router.static-resources.swagger.mapping=/swagger/

Environment Information

No response

Example Application

https://github.com/abondar24/TelegramBots/tree/master/Webhook/ChatAnalyzerBot

Version

4.3.5

abondar24 commented 3 months ago

root case is here: micronaut.router.static-resources.swagger.mapping=/swagger when I replace wirth / limit works, but swagger can't load api doc,