fix Active Streams count System always showing 4/16#32
Merged
matteius merged 2 commits intoopensensor:mainfrom Mar 26, 2025
Merged
fix Active Streams count System always showing 4/16#32matteius merged 2 commits intoopensensor:mainfrom
matteius merged 2 commits intoopensensor:mainfrom
Conversation
deleted section instead of just commenting out "active_streams = 4"
matteius
approved these changes
Mar 26, 2025
matteius
added a commit
that referenced
this pull request
Feb 21, 2026
…printf overflow, TOCTOU, command injection) Fix #39 (stream_protocol.c:510): remove redundant null check after validated pointer Fix #16 (sqlite_migrate.c:700): validate migration file path is within configured migrations directory before executing SQL to prevent SQL injection via crafted migration files Fix #40-41 (db_query_builder.c:83,88): add snprintf truncation checks with error return Fix #42-43 (db_zones.c:31,33): add snprintf truncation checks in polygon_to_json() Fix #44-45 (go2rtc_api.c:376,378): fix buffer size mismatch and add truncation checks Fix #25 (daemon.c:266): replace chmod(path) with fchmod(fd) to eliminate TOCTOU Fix #26 (db_backup.c:110): remove stat() check before fopen(); attempt directly Fix #28 (storage_manager.c:225): remove stat() check before unlink() in delete_recording() Fix #27 (storage_manager.c:460): use lstat() instead of stat() to prevent symlink following Fix #29 (ffmpeg_utils.c:416): use lstat() and skip chmod on symlinks Fix #32,#33 (hls_directory.c:84,96): replace chmod() with fd-based fchmod() via O_DIRECTORY Fix #30,#31 (hls_directory.c:439,476): use lstat() + S_ISREG check before unlink Fix #34 (hls_writer.c:457): replace chmod() with fd-based fchmod() via O_DIRECTORY Fix #38,#35,#37 (api_handlers_recordings_backend_agnostic.c:249,338,474): remove stat() checks before unlink(); rely on errno==ENOENT for missing-file detection Fix #36 (api_handlers_recordings_files_backend_agnostic.c:119): remove stat() before unlink(); derive 'existed' from unlink() result and errno Command injection mitigations (already present, confirmed complete): - api_handlers_system.c: get_directory_size() replaces all popen("du ...") calls - api_handlers_settings.c: is_safe_storage_path() validates storage_path inputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix for System > Streams & Recordings , "Active Streams" always showing 4/16
answer was already in api_handlers_system.c and commented out active_steams = 4
did a "docker build ." after change and tested that Active Stream count now shows actual number of active streams