8000 Speedup serving configs as json by flreinhard · Pull Request #191 · roleoroleo/sonoff-hack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Speedup serving configs as json #191

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

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

flreinhard
Copy link
Contributor
@flreinhard flreinhard commented Mar 2, 2025

On my camera the load times for the requests to get_config.sh?conf= changed as follows:
ptz page:
system: before 10s => after 3.6s
ptz_presets: before 3.8s => after 1.7s

mqtt page:
system: before 5.8s => after 1.2s
mqtt: before 4.2s => after 0.7s

On my camera the load times for the requests to get_config.sh?conf=
system: before 10s => after 3.6s
ptz_presets: before 3.8s => after 1.7s
- escape backslashes
- escape double quotes
@roleoroleo
Copy link
Owner

Have you tried if this code is affected by sed injection?
I'm not an expert...

@flreinhard
Copy link
Contributor Author

Short: no it's not.
Long: IMO that's the wrong place for a command injection. It's a static serach/repalce pattern on a external file. Injection could happen if you take a users input (e.g. through website) and pass that as an argument to sed but fail to properly escape the argument/string.

@roleoroleo
Copy link
Owner
roleoroleo commented Mar 7, 2025

I recently received a mail message about a sed injection on this shell script, that I fixed with this commit:
61f50f5
If you prepare a special string to use as a content of the post, the risk is a command shell execution in the remote host.
But sed is not my friend and I'm unable to check if your command is affected.

  • EDIT -

My mistake, I was thinking about set_configs.sh

@roleoroleo roleoroleo merged commit 1d47835 into roleoroleo:master Mar 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0