From 3b0783e20aadb40519bb6eb174b4508c6d9620be Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Tue, 21 Mar 2017 20:44:47 +0900 Subject: [PATCH] make case-insensitive to notification URI scheme (refs #4055) --- apps/api/lib/helper/opJsonApiHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/lib/helper/opJsonApiHelper.php b/apps/api/lib/helper/opJsonApiHelper.php index 896a3d6d9..4d0459137 100644 --- a/apps/api/lib/helper/opJsonApiHelper.php +++ b/apps/api/lib/helper/opJsonApiHelper.php @@ -202,7 +202,7 @@ function op_api_notification($notification) // Basically, those URLs begin with relative URL root (ex. "/subdir/member/1"). $url = $notification['url']; } - elseif (0 === strpos($notification['url'], 'http://') || 0 === strpos($notification['url'], 'https://')) + elseif (preg_match('#^https?://#i', $notification['url'])) { $url = $notification['url']; }