asterisk/tests
George Joseph 87641e9b2c res_ari: Ensure read-only users are properly authorized via REST Over WebSocket.
The REST over WebSocket path now properly prevents non-GET methods from
being executed on inbound WebSockets.

* The query parameters from the original incoming GET request that caused the
upgrade to WebSocket are now passed to all REST requests that come from the
client. This ensures that if the client authenticated with a read-only
userid using the "api_key" query_string parameter, REST requests coming
in over the WebSocket will only be able to execute GETs on resources.
The HTTP headers were already passed to the REST requests so if the
client had authenticated via an "Authorization" it was properly handled.

* New tests have been added to test_ari.c to check that read-only users
are properly denied access to resources using non-GET methods.  Several
memory leaks were also squashed.

Resolves: #GHSA-wcvv-g26m-wx5c
2026-06-25 09:35:20 -06:00
..
CI chan_sip: Remove deprecated module. 2023-01-03 09:00:42 -06:00
keys test: Add coverage for res_crypto 2022-09-12 14:58:04 -05:00
Makefile test: Add coverage for res_crypto 2022-09-12 14:58:04 -05:00
test_abstract_jb.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_acl.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_aeap.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_speech.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_transaction.c res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
test_aeap_transport.c websocket / aeap: Handle poll() interruptions better. 2022-07-11 04:10:19 -05:00
test_ami_security_events.sh Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_amihooks.c core: Remove dead symbols from asterisk.exports.in. 2018-03-19 17:59:59 -04:00
test_aoc.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_app.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_ari.c res_ari: Ensure read-only users are properly authorized via REST Over WebSocket. 2026-06-25 09:35:20 -06:00
test_ari_model.c optional_api: Remove unused nonoptreq fields 2018-09-12 12:34:54 -05:00
test_ast_format_str_reduce.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_astobj2.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_astobj2_thrash.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_astobj2_weaken.c astobj2: Create function to copy weak proxied objects from container. 2018-11-21 08:47:27 -05:00
test_bridging.c progdocs: Fix Doxygen left-overs. 2021-12-13 08:57:26 -06:00
test_bucket.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
test_callerid.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_capture.c test: Add test coverage for capture child process output 2022-09-12 11:22:44 -05:00
test_cdr.c cdr: allow disabling CDR by default on new channels 2022-01-31 09:24:12 -06:00
test_cel.c Merge "bridges: Remove reliance on stasis caching" 2018-11-29 15:05:33 -06:00
test_channel.c channel: Remove old epoll support and fixed max number of file descriptors. 2017-03-27 19:54:44 +00:00
test_channel_feature_hooks.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
test_codec_translations.c tests: add tests/test_codec_translations.c 2026-06-04 13:55:17 +00:00
test_config.c res_geolocation: Fix segfault when there's an empty element 2022-09-13 09:51:37 -05:00
test_conversions.c conversions.c: Specify that we only want to parse decimal numbers. 2022-03-23 17:13:03 -05:00
test_core_codec.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_core_format.c Correct some leaks in unit tests. 2017-08-03 22:09:28 -04:00
test_crypto.c main, res, tests: Fix compilation errors on FreeBSD. 2024-11-14 20:02:03 +00:00
test_data_buffer.c res_rtp: Add unit tests for RTCP stats. 2019-09-10 13:11:07 -05:00
test_db.c db.c: Remove limit on family/key length 2024-11-14 20:02:03 +00:00
test_devicestate.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_dlinklists.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_dns.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_naptr.c tests: Fix for Doxygen. 2021-11-18 10:19:10 -06:00
test_dns_query_set.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_recurring.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_dns_srv.c tests_dns: Make DNS tests older nameser.h compatible 2016-12-08 07:22:33 +11:00
test_endpoints.c modules: Add missing run time module support levels. 2018-10-17 14:50:54 -05:00
test_event.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_expr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_file.c file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type 2016-11-15 21:21:59 -05:00
test_format_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_format_cap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_func_file.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_gosub.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_hashtab_thrash.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
test_heap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_http_media_cache.c test_http_media_cache.c: Fix copy/paste error during test deregistration. 2021-09-13 07:11:01 -05:00
test_jitterbuf.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_json.c test_json: Remove duplicated static function. 2022-11-21 07:46:53 -06:00
test_linkedlists.c various: Fix GCC 11 compilation issues. 2021-10-21 13:18:41 -05:00
test_locale.c Compiler fixes for gcc 10 2020-06-10 09:33:28 -05:00
test_logger.c tests: Fix warnings found on Mac. 2017-11-18 22:13:32 -05:00
test_media_cache.c db.c: Remove limit on family/key length 2024-11-14 20:02:03 +00:00
test_message.c gcc14: Fix issues caught by gcc 14 2025-01-23 18:42:28 +00:00
test_mwi.c tests: Fix compilation errors on 32-bit. 2022-10-28 06:45:11 -05:00
test_named_lock.c lock: Add named lock capability 2016-04-08 13:52:02 -05:00
test_netsock2.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_optional_api.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_pbx.c test.c: Fix counting of tests and add 2 new tests 2023-04-03 07:41:08 -06:00
test_poll.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_res_pjsip_scheduler.c test_res_pjsip_scheduler: Fix possible write after free in scheduler_policy. 2018-11-13 13:26:06 -05:00
test_res_pjsip_session_caps.c res_pjsip: Adjust outgoing offer call pref. 2020-10-13 11:10:56 -03:00
test_res_prometheus.c test_res_prometheus: Fix compilation failure on Debian 13. 2025-09-17 11:40:38 -06:00
test_res_rtp.c res_rtp_asterisk: Asterisk Media Experience Score (MES) 2023-01-09 11:40:58 -06:00
test_res_stasis.c res/res_ari: Added timestamp as a requirement for all ARI events 2019-03-11 23:57:01 +01:00
test_sched.c sched: fix and test a double deref on delete of an executing call back 2022-01-21 10:06:57 -06:00
test_scope_trace.c Scope Trace: Add some new tracing macros and an ast_str helper 2020-06-30 09:22:32 -05:00
test_scoped_lock.c astobj2: Remove legacy ao2_container_alloc routine. 2018-11-21 09:56:16 -05:00
test_security_events.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_skel.c Add ability to pass arguments to unit tests from the CLI 2025-01-23 18:42:28 +00:00
test_sorcery.c sorcery: Prevent duplicate objects and ensure missing objects are created on update 2025-09-17 11:40:38 -06:00
test_sorcery_astdb.c sorcery: Prevent duplicate objects and ensure missing objects are created on update 2025-09-17 11:40:38 -06:00
test_sorcery_memory_cache_thrash.c tests: Spelling fixes 2021-11-15 22:48:56 -06:00
test_sorcery_realtime.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_stasis.c taskpool: Fix some references to threadpool that should be taskpool. 2025-10-30 16:09:11 +00:00
test_stasis_channels.c stasis: Update the snapshot after setting the redirect 2023-11-07 14:27:15 +00:00
test_stasis_endpoints.c endpoints: Remove need for stasis subscription. 2025-10-30 16:09:11 +00:00
test_stasis_state.c tests: Fix compilation errors on 32-bit. 2022-10-28 06:45:11 -05:00
test_stream.c Streams: Add features for Advanced Codec Negotiation 2020-07-01 09:27:14 -05:00
test_stringfields.c stringfields: Update extended string fields for master only. 2016-04-13 14:01:37 -06:00
test_strings.c strings.c: Improve numeric detection in ast_strings_match(). 2025-01-23 18:42:28 +00:00
test_substitution.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
test_taskpool.c pjsip: Move from threadpool to taskpool 2026-01-15 16:59:16 +00:00
test_taskprocessor.c taskprocessors: Improve logging and add new cli options 2026-01-15 16:59:16 +00:00
test_threadpool.c pjsip: Move from threadpool to taskpool 2026-01-15 16:59:16 +00:00
test_time.c test_time.c: Tolerate DST transitions 2022-01-04 07:48:35 -06:00
test_uri.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test_utils.c build: Fix a few gcc 13 issues 2023-06-09 18:19:53 +00:00
test_uuid.c Add uuid wrapper API call ast_uuid_generate_str(). 2013-03-28 23:59:20 +00:00
test_vector.c GCC12: Fixes for 16+ 2022-05-09 08:21:45 -05:00
test_voicemail_api.c app_macro: Remove deprecated module. 2023-01-10 14:07:44 -06:00
test_websocket_client.c test_websocket_client.c: Disable websocket_client_create_and_connect test. 2018-12-02 08:55:23 -05:00
test_xml_escape.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00