Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pfrest/pfSense-pkg-RESTAPI
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pfrest/pfSense-pkg-RESTAPI
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: next_minor
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 11 files changed
  • 3 contributors

Commits on Jan 24, 2026

  1. Add validity information for certificates endpoints (#834)

    * show all certs validity
    
    * show cert validity info in cert endpoint
    
    * show validity inside cert endpoint
    
    * prettier
    
    * return -1 if expired
    guillaumearnx authored Jan 24, 2026
    Configuration menu
    Copy the full SHA
    079d515 View commit details
    Browse the repository at this point in the history
  2. fix(PortForward)!: remove sorting presets #835

    Forcing objects to be sorted by interface for this model is unnecessary and in some cases could be problematic. The webConfigurator does not have this restriction therefor neither should the API.
    jaredhendrickson13 committed Jan 24, 2026
    Configuration menu
    Copy the full SHA
    57a491d View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2026

  1. Configuration menu
    Copy the full SHA
    8b1a33c View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2026

  1. Configuration menu
    Copy the full SHA
    f5a589b View commit details
    Browse the repository at this point in the history
  2. fix: pass pagination limit to log-reading callables to prevent OOM (#860

    )
    
    Log endpoints load ALL log files (current + every rotated/compressed
    copy) into memory before Model::read_all() applies pagination via
    array_slice(). Even ?limit=1 loads the entire dataset, causing PHP
    memory exhaustion (512MB) on systems with moderate log volumes.
    
    This passes the pagination limit from Model::read_all() through
    get_internal_objects() to log-reading callables so they stop early.
    
    LogFileModelTraits changes:
    - read_log() accepts optional $limit parameter
    - When limit > 0, reads newest files first and stops when satisfied
    - Plain files: reverse-reads from EOF via fseek - O(limit) memory
    - Compressed files: streams via PHP stream wrappers
      (compress.zlib://, compress.bzip2://) and popen (xz) with a ring
      buffer - O(limit) memory for all formats
    - gather_log_filepaths() uses glob($base.'.*') to avoid matching
      unrelated files, sorts newest-first by rotation number
    - Unbounded reads (limit=0) preserve existing behavior exactly
    
    Model.inc changes:
    - get_internal_objects() accepts optional $limit hint
    - Forwards limit to callables via cached reflection check
      (backward-compatible with callables that don't accept it)
    - read_all() passes limit+offset down; skips optimization when
      reverse=true since that needs the full dataset
    
    All 6 log model callables updated to accept and forward limit.
    10 new test cases covering bounded reads, edge cases, mixed
    compression, and unrelated file filtering.
    
    Tested on live pfSense (FreeBSD 15.0, 28MB filter.log + 31 rotated
    bz2 files): memory dropped from 512MB+ (OOM) to 22MB, response
    time 1ms for ?limit=10.
    
    Fixes #806
    JeremiahChurch authored Mar 28, 2026
    Configuration menu
    Copy the full SHA
    2983ee3 View commit details
    Browse the repository at this point in the history
Loading