powershell-universal
powershell-universal copied to clipboard
Misleading HTTP responses for API endpoints
Version
4.2.21
Severity
Low
Environment
msi
Steps to Reproduce
When attempting to hit an API endpoint that does not exist OR using the incorrect method, an HTTP 401 response with an empty body is received.
Expected behavior
Wrong method -> HTTP 405 response
Nonexistent endpoint -> HTTP 404 response
Actual behavior
HTTP 401 is received in all cases
Additional Environment data
- Windows Server 2019
- PowerShell 7
- Non-IIS config (Kestrel)
Screenshots/Animations
No response