Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/97540


Change subject: Added relative redirect workaround until its fixed ext
......................................................................

Added relative redirect workaround until its fixed ext

Enforces all URLs to have a protocol (instead of being relative '//')

Change-Id: Ia5464d2f81f66f8a0a45475afc54512f094a8f1b
---
M mobilelanding.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/40/97540/1

diff --git a/mobilelanding.php b/mobilelanding.php
index 912c7f5..cbb83cc 100644
--- a/mobilelanding.php
+++ b/mobilelanding.php
@@ -7,6 +7,11 @@
 $code = '302';
 $state = Extensions\ZeroRatedMobileAccess\PageRenderingHooks::getState();
 $redirect = $state->getLandingRedirect();
+
+// Temporary fix as it duplicates the same call in getLandingRedirect()
+// The fix ensures that there is no relative redirects
+$redirect = wfExpandUrl( $redirect );
+
 $redirect = filter_var( $redirect, FILTER_VALIDATE_URL );
 if ( $redirect === false ) {
        $code = '500';

-- 
To view, visit https://gerrit.wikimedia.org/r/97540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5464d2f81f66f8a0a45475afc54512f094a8f1b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to