-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Limit the extra options of jemalloc profiler #3101
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
Conversation
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds validation for the extra_options query parameter in the jemalloc profiler to prevent arbitrary command injection. It ensures only valid jemalloc profiler options are accepted and refactors string concatenation to use safer string formatting functions.
- Introduces a whitelist of valid extra options for jemalloc profiler
- Adds validation to only accept predefined extra options
- Refactors string concatenation to use
butil::string_printfandbutil::string_appendf
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
* Limit the extra options of jemalloc profiler * Add warning log
What problem does this PR solve?
Issue Number:
Problem Summary:
Limit the extra options of jemalloc profiler to one of inuse_space, inuse_objects, alloc_space, alloc_objects, show_bytes, drop_negative, total_delay, contentions or mean_delay.
What is changed and the side effects?
Changed:
Side effects:
Performance effects:
Breaking backward compatibility:
Check List: