SECURITY: Fix CORS origin matching in the API
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 8 Dec 2014 15:43:50 +0000 (10:43 -0500)
committermglaser <glaser@hallowelt.biz>
Wed, 17 Dec 2014 18:27:33 +0000 (19:27 +0100)
Bug: T77028
Change-Id: I68c1ee5b5a048af2aba4e710bc301b09748389bf

includes/api/ApiMain.php

index 81353f6..c03e513 100644 (file)
@@ -575,7 +575,7 @@ class ApiMain extends ApiBase {
                        $wildcard
                );
 
-               return "/https?:\/\/$wildcard/";
+               return "/^https?:\/\/$wildcard$/";
        }
 
        protected function sendCacheHeaders() {