Skip to content

Input validation sweep across tool parameters #16

@mwtcmi

Description

@mwtcmi

A recent code review surfaced ~15 tools that check parameters with only !empty(). Most are admin-level surfaces, but tightening this is cheap and reduces the blast radius of any future auth bypass or parameter-confusion bug.

Tools needing format validation:

  • fm_disable_voicemail, fm_enable_voicemailext should match /^\d+$/
  • fm_disable_trunk, fm_enable_trunkid should match /^\d+$/
  • fm_delete_ringgroupid should match /^\d+$/
  • fm_pjsip_qualifyext should match /^[a-zA-Z0-9_-]+$/
  • fm_toggle_daynightid should match /^\d+$/
  • fm_toggle_dndext should match /^\d+$/
  • fm_module_{disable,enable,install,uninstall,upgrade}name should match /^[a-zA-Z0-9_-]+$/
  • fm_backup_createid should be UUID or numeric
  • fm_monitor_call, fm_stop_monitor_call, fm_transfer_callchannel should match a channel pattern
  • fm_originate_callext/dest should be dialable digits

Pattern reference: DiagnoseExtension.php:11 and PjsipEndpointDetails.php already do this correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions