File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
interface/modules/custom_modules/oe-module-faxsms/library Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1717
1818// Set site from query parameter for multi-site support
1919$ _GET ['auth ' ] = 'portal ' ; // Enable site selection
20- $ _GET ['site ' ] ??= 'default ' ;
20+
21+ if (empty ($ _GET ['site ' ])) {
22+ error_log ('Fax site ID missing ' );
23+ die;
24+ }
2125
2226require_once (__DIR__ . "/../../../../globals.php " );
2327
@@ -183,6 +187,11 @@ function downloadAndStoreFaxMedia(
183187 int $ patientId = 0
184188): void {
185189 try {
190+ // Validate mediaUrl to prevent SSRF attacks
191+ if (!isValidSignalWireUrl ($ mediaUrl )) {
192+ error_log ("SignalWire Webhook: Invalid or unauthorized media URL: " . $ mediaUrl );
193+ return ;
194+ }
186195 // Get SignalWire credentials
187196 $ vendor = '_signalwire ' ;
188197 $ credentials = QueryUtils::querySingleRow (
You can’t perform that action at this time.
0 commit comments