From 6cd8b90d288f691bb38d41c4e709f210a7463287 Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Tue, 20 Sep 2022 21:07:31 +0500 Subject: [PATCH] [VkBridge] Follow changes on HTTP redirection (#3051) When visiting canonical link like https://vk.com/club1, VK returns redirection response to non-canical link, which raises "Unexpected redirect location" exception. This patch removes path check in order to handle this situation --- bridges/VkBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/VkBridge.php b/bridges/VkBridge.php index 0d1a1e2a..89380963 100644 --- a/bridges/VkBridge.php +++ b/bridges/VkBridge.php @@ -446,7 +446,7 @@ class VkBridge extends BridgeAbstract returnServerError('VK responded "Too many requests"'); } - if (!preg_match('#^https?://vk.com/(club|public)#', $uri)) { + if (!preg_match('#^https?://vk.com/#', $uri)) { returnServerError('Unexpected redirect location'); }