Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛Illegal status code can be registered at http_status #1389

Open
kurochan opened this issue Jan 6, 2025 · 3 comments
Open

🐛Illegal status code can be registered at http_status #1389

kurochan opened this issue Jan 6, 2025 · 3 comments
Labels
Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working

Comments

@kurochan
Copy link

kurochan commented Jan 6, 2025

Describe the bug
2024-12-24-11 09 30@2x

Weak validation of http_status, so incorrect can register http status.

To Reproduce

  1. Configure http_status:999

Expected behavior
Only existing http status codes can be registered.

Environment and versions

  • OS: All
  • Architecture: All
  • Version: 2024.12.2

Additional context
After this, I plan to create a PR, but fixing this issue requires modifications not only to cloudflared but also to the Web UI( https://one.dash.cloudflare.com/ ).

@kurochan kurochan added Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working labels Jan 6, 2025
@lazysegtree
Copy link

Is there a possible security issue due to invalid HTTP status code ?

@lazysegtree
Copy link

Also there are some "Unofficial codes" that might be a valid use case (See wiki ), for which go's StatusText function (source) would not return any text.

  • For example HTTP 218, 509, 529, and many more

(Here is a screenshot from wiki page about the additional unofficial codes, used by cloudflare too)
image

See - #1390 (comment)

@lazysegtree
Copy link

lazysegtree commented Jan 19, 2025

In my opinion, this should not be done. We should allow any unofficial HTTP code, on any other custom HTTP code a user wants. This doesn't seem to pose any security risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants