Releases: sboily/asterisk-consul-module
Releases · sboily/asterisk-consul-module
0.0.5
Full Changelog: 0.4...0.0.5
fix: Address code review findings for security, memory, and thread safety
Security fixes:
- Move Consul token from URL query parameter to X-Consul-Token header
- Mask token in CLI output (discovery show settings)
Memory management fixes:
- Fix memory leak in consul_put_json() JSON debug output
- Add safe_slist_append() helper with NULL checks for curl_slist
- Fix ast_json_free -> ast_json_unref for JSON objects
- Add proper cleanup paths in consul_maintenance_service()
Error handling fixes:
- Only fire DiscoveryRegister event on successful HTTP response
- Return error from load_res() on cURL failure
- Validate AMI Enable parameter accepts only "true"/"false"
- Check metadata profile section exists before marking valid
Code quality fixes:
- Replace sprintf with snprintf in discovery_ip_address()
- Convert C++ style comments to C style
- Fix indentation in discover_ari_settings() (4-space to tabs)
- Move variable declarations to block start for C89 compliance
Thread safety:
- Add config_lock mutex for global_config/global_metadata access
- Protect config reads in handle_http_check_eid()
- Lock config updates in load_config()
Logic fixes:
- Simplify enabled/check parsing in load_config()